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:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-03-17 15:09:52 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-03-17 15:09:52 +0300
commit8ae26d705abe341b03bc15d4373d6cd0c77c0baf (patch)
tree655ee03a968e340c975b8ab7d77cfd5ceaf3c969 /app/workers/concerns
parentfc1df8c8307fc5022f9e8aae04164c089d8fdf2e (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/workers/concerns')
-rw-r--r--app/workers/concerns/application_worker.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/app/workers/concerns/application_worker.rb b/app/workers/concerns/application_worker.rb
index 733156ab758..c0062780688 100644
--- a/app/workers/concerns/application_worker.rb
+++ b/app/workers/concerns/application_worker.rb
@@ -13,6 +13,17 @@ module ApplicationWorker
included do
set_queue
+
+ def structured_payload(payload = {})
+ context = Labkit::Context.current.to_h.merge(
+ 'class' => self.class,
+ 'job_status' => 'running',
+ 'queue' => self.class.queue,
+ 'jid' => jid
+ )
+
+ payload.stringify_keys.merge(context)
+ end
end
class_methods do