Skip to content
代码片段 群组 项目
提交 5e4b31f0 编辑于 作者: Max Fan's avatar Max Fan 提交者: Stan Hu
浏览文件

Reschedule_once duplication strategy for EntityWorker

上级 d5055cef
No related branches found
No related tags found
无相关合并请求
...@@ -5,13 +5,13 @@ class EntityWorker ...@@ -5,13 +5,13 @@ class EntityWorker
include ApplicationWorker include ApplicationWorker
idempotent! idempotent!
deduplicate :until_executed deduplicate :until_executed, if_deduplicated: :reschedule_once
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!
PERFORM_DELAY = 5.seconds PERFORM_DELAY = 30.seconds
# Keep `_current_stage` parameter for backwards compatibility. # Keep `_current_stage` parameter for backwards compatibility.
# The parameter will be remove in https://gitlab.com/gitlab-org/gitlab/-/issues/426311 # The parameter will be remove in https://gitlab.com/gitlab-org/gitlab/-/issues/426311
......
...@@ -49,6 +49,10 @@ ...@@ -49,6 +49,10 @@
end end
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 context 'when pipeline workers from a stage are running' do
before do before do
pipeline_tracker.enqueue! pipeline_tracker.enqueue!
......
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册