diff options
-rw-r--r-- | app/workers/bulk_imports/entity_worker.rb | 4 | ||||
-rw-r--r-- | spec/workers/bulk_imports/entity_worker_spec.rb | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/app/workers/bulk_imports/entity_worker.rb b/app/workers/bulk_imports/entity_worker.rb index 9b60dcdeb8a..1c555d95a2e 100644 --- a/app/workers/bulk_imports/entity_worker.rb +++ b/app/workers/bulk_imports/entity_worker.rb @@ -5,13 +5,13 @@ module BulkImports include ApplicationWorker idempotent! - deduplicate :until_executed + deduplicate :until_executed, if_deduplicated: :reschedule_once data_consistency :always feature_category :importers sidekiq_options retry: false, dead: false worker_has_external_dependencies! - PERFORM_DELAY = 5.seconds + PERFORM_DELAY = 30.seconds # Keep `_current_stage` parameter for backwards compatibility. # The parameter will be remove in https://gitlab.com/gitlab-org/gitlab/-/issues/426311 diff --git a/spec/workers/bulk_imports/entity_worker_spec.rb b/spec/workers/bulk_imports/entity_worker_spec.rb index 5f948906c08..5902ca87a17 100644 --- a/spec/workers/bulk_imports/entity_worker_spec.rb +++ b/spec/workers/bulk_imports/entity_worker_spec.rb @@ -49,6 +49,10 @@ RSpec.describe BulkImports::EntityWorker, feature_category: :importers do end end + it 'has the option to reschedule once if deduplicated' do + expect(described_class.get_deduplication_options).to include({ if_deduplicated: :reschedule_once }) + end + context 'when pipeline workers from a stage are running' do before do pipeline_tracker.enqueue! |