Skip to content

Changing stuckImportWorker to removed based on updated_at

Max Fan requested to merge 429867-remove-hardcoded-timelimit-for-migration into master

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

  1. Kill sidekiq worker so imports are not processed. They'll be stuck in limbo state
  2. Change the BulkImport and/or BulkImports::Entity updated_at to 5 days ago
  3. In the console
BulkImports::StuckImportWorker.new.perform
  1. 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.

Related to #429867 (closed)

Edited by Max Fan

Merge request reports