summaryrefslogtreecommitdiff
path: root/app/workers/concerns
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-04-20 18:38:24 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-04-20 18:38:24 +0000
commit983a0bba5d2a042c4a3bbb22432ec192c7501d82 (patch)
treeb153cd387c14ba23bd5a07514c7c01fddf6a78a0 /app/workers/concerns
parenta2bddee2cdb38673df0e004d5b32d9f77797de64 (diff)
downloadgitlab-ce-983a0bba5d2a042c4a3bbb22432ec192c7501d82.tar.gz
Add latest changes from gitlab-org/gitlab@12-10-stable-ee
Diffstat (limited to 'app/workers/concerns')
-rw-r--r--app/workers/concerns/cronjob_queue.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/app/workers/concerns/cronjob_queue.rb b/app/workers/concerns/cronjob_queue.rb
index 25ee4539cab..955387b5ad4 100644
--- a/app/workers/concerns/cronjob_queue.rb
+++ b/app/workers/concerns/cronjob_queue.rb
@@ -10,4 +10,14 @@ module CronjobQueue
sidekiq_options retry: false
worker_context project: nil, namespace: nil, user: nil
end
+
+ class_methods do
+ # Cronjobs never get scheduled with arguments, so this is safe to
+ # override
+ def context_for_arguments(_args)
+ return if Gitlab::ApplicationContext.current_context_include?('meta.caller_id')
+
+ Gitlab::ApplicationContext.new(caller_id: "Cronjob")
+ end
+ end
end