diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-11-05 00:09:35 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-11-05 00:09:35 +0300 |
commit | 98e2f18e5b9716416d183262c21c31524de7331a (patch) | |
tree | 7f3fcaab0296169c3c7e61d0ade70ee147b6fa13 | |
parent | f4c0eed6e59f393302ccc38468063cb5c4698f79 (diff) |
Add latest changes from gitlab-org/gitlab@master
-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! |