Commit f75d5789 authored by George Koltsov's avatar George Koltsov

Update BulkImports::EntityWorker deduplication strategy

  - BulkImports::EntityWorker jobs were deduplicated unintentionally
    leaving GitLab Migrations stalled in started state
  - Update strategy from :until_executed to :until_executing in order
    to make sure migration progress is made without stalling

Changelog: fixed
parent bc8a1f1f
...@@ -4,17 +4,13 @@ module BulkImports ...@@ -4,17 +4,13 @@ module BulkImports
class EntityWorker # rubocop:disable Scalability/IdempotentWorker class EntityWorker # rubocop:disable Scalability/IdempotentWorker
include ApplicationWorker include ApplicationWorker
idempotent!
deduplicate :until_executing
data_consistency :always data_consistency :always
feature_category :importers feature_category :importers
sidekiq_options retry: false, dead: false sidekiq_options retry: false, dead: false
worker_has_external_dependencies! worker_has_external_dependencies!
idempotent!
deduplicate :until_executed, including_scheduled: true
def perform(entity_id, current_stage = nil) def perform(entity_id, current_stage = nil)
return if stage_running?(entity_id, current_stage) return if stage_running?(entity_id, current_stage)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment