Changing stuckImportWorker to removed based on updated_at
What does this MR do and why?
Currently if an import takes too long, the stuckImportWorker will kill the bulk import.
Now, we're refreshing the updated_at
attributes for BulkImports
and BulkImport::Entity
when they're being processed by the runner.
When the stuckImportWorker looks for imports to kill, it'll skip the imports that have been refreshed with updated_at > 24
hours ago & have status started or created
Screenshots or screen recordings
Screenshots are required for UI changes, and strongly recommended for all other merge requests.
Before | After |
---|---|
How to set up and validate locally
- Kill sidekiq worker so imports are not processed. They'll be stuck in limbo state
- Change the BulkImport and/or BulkImports::Entity
updated_at
to 5 days ago - In the console
BulkImports::StuckImportWorker.new.perform
- That will kill all the imports that were modified
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Related to #429867 (closed)
Edited by Max Fan