feat: rework indexing to a separate daemon #455
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Your checklist for this pull request
What is the current behaviour?
This is (hopefully) the final part of the s3 indexing story, and the indexing rework.
Right now in the released version of mquery the only way to index things is to run independent scripts. After the recent series of PRs, there is a queue API that lets users add files to a queue in mquery database.
What is the new behaviour?
This PR specifically changes the way indexer works - instead of being a regular daemon with special magic task, it's a separate service that always work in the background. In the future we may make it possible to control this service from the UI, but it didn't fit the worker model - indexing tasks are potentially extremely long, while worker should finish each task relatively quickly.