summaryrefslogtreecommitdiff
path: root/app/workers/concerns/worker_attributes.rb
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-02-19 18:09:10 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-02-19 18:09:10 +0000
commit33795139ea8e72756bee3675b4e16387425e6ab1 (patch)
tree3ca568fca61482e57810ee30ad5ce4b964a82c4e /app/workers/concerns/worker_attributes.rb
parentc7e385e282bcb8505589bce526e692b7bb819ffa (diff)
downloadgitlab-ce-33795139ea8e72756bee3675b4e16387425e6ab1.tar.gz
Add latest changes from gitlab-org/gitlab@master
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