Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app/workers/concerns/worker_attributes.rb')
-rw-r--r--app/workers/concerns/worker_attributes.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/app/workers/concerns/worker_attributes.rb b/app/workers/concerns/worker_attributes.rb
index babdb46bb85..55feba673c4 100644
--- a/app/workers/concerns/worker_attributes.rb
+++ b/app/workers/concerns/worker_attributes.rb
@@ -89,6 +89,14 @@ module WorkerAttributes
worker_attributes[:resource_boundary] || :unknown
end
+ def idempotent!
+ worker_attributes[:idempotent] = true
+ end
+
+ def idempotent?
+ worker_attributes[:idempotent]
+ end
+
def weight(value)
worker_attributes[:weight] = value
end