diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-03-17 12:09:52 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-03-17 12:09:52 +0000 |
commit | 8ae26d705abe341b03bc15d4373d6cd0c77c0baf (patch) | |
tree | 655ee03a968e340c975b8ab7d77cfd5ceaf3c969 /app/workers | |
parent | fc1df8c8307fc5022f9e8aae04164c089d8fdf2e (diff) | |
download | gitlab-ce-8ae26d705abe341b03bc15d4373d6cd0c77c0baf.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/workers')
-rw-r--r-- | app/workers/concerns/application_worker.rb | 11 |
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 |