You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After #1696, there should be an IndexJob that records indexing tasks, but is essentially just a log.
Refactor the indexing functionality so it is centred around the lifecycle of an IndexJob. More concretely, allow administrators to create jobs in the admin site that will actually be run.
You can create a new IndexJob using the admin site. This just creates the object with status "pending".
Using an admin action, you can start a pending job. I-analyzer will use celery to execute the job asynchronously. Status is updated to "in progress".
You can interrupt a job using a Django admin action. This kills the task in celery and sets the status to "aborted".
When the celery task completes or fails, the status is updated to "complete" or "error".
CLI
It's possible to keep the index and alias commands function as they do now. Under the hood, those commands would need to:
Create an IndexJob that describes the action (this should already be implemented in IndexJob model #1696)
Immediately start the job, and run the celery task synchronously.
Alternatively, you could rework the command line interface to be parallel to the admin actions. So you use index and alias to create the IndexJob without running it. Then you could add commands to view, start, and stop index jobs. (But you could also create a job in the command line and then start it from the admin site, or vice versa.)
The text was updated successfully, but these errors were encountered:
Part of #1007
After #1696, there should be an
IndexJob
that records indexing tasks, but is essentially just a log.Refactor the indexing functionality so it is centred around the lifecycle of an
IndexJob
. More concretely, allow administrators to create jobs in the admin site that will actually be run.IndexJob
using the admin site. This just creates the object with status "pending".CLI
It's possible to keep the
index
andalias
commands function as they do now. Under the hood, those commands would need to:IndexJob
that describes the action (this should already be implemented in IndexJob model #1696)Alternatively, you could rework the command line interface to be parallel to the admin actions. So you use
index
andalias
to create the IndexJob without running it. Then you could add commands to view, start, and stop index jobs. (But you could also create a job in the command line and then start it from the admin site, or vice versa.)The text was updated successfully, but these errors were encountered: