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 'lib/gitlab/job_waiter.rb')
-rw-r--r--lib/gitlab/job_waiter.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/gitlab/job_waiter.rb b/lib/gitlab/job_waiter.rb
index 52234b50a1f..880b112d815 100644
--- a/lib/gitlab/job_waiter.rb
+++ b/lib/gitlab/job_waiter.rb
@@ -38,6 +38,10 @@ module Gitlab
key.is_a?(String) && key =~ /\A#{KEY_PREFIX}:\h{8}-\h{4}-\h{4}-\h{4}-\h{12}\z/o
end
+ def self.generate_key
+ "#{KEY_PREFIX}:#{SecureRandom.uuid}"
+ end
+
attr_reader :key, :finished, :worker_label
attr_accessor :jobs_remaining