summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorPaco Guzman <pacoguzmanp@gmail.com>2016-06-23 07:03:24 +0200
committerPaco Guzman <pacoguzmanp@gmail.com>2016-06-23 07:03:24 +0200
commitf893fbaa2cd56b76d12c3f15a1c6848d96f2421b (patch)
treea5a85b79b4d29fe00f3ba8f28177cd2c20b3300d /lib
parentc6f14956d64e726f613c0092587f97444beeebb7 (diff)
downloadgitlab-shell-f893fbaa2cd56b76d12c3f15a1c6848d96f2421b.tar.gz
Update PostReceive worker to provide enqueued_at timeenqueued_at_for_jobs
Diffstat (limited to 'lib')
-rw-r--r--lib/gitlab_post_receive.rb7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/gitlab_post_receive.rb b/lib/gitlab_post_receive.rb
index 9f75433..4b80174 100644
--- a/lib/gitlab_post_receive.rb
+++ b/lib/gitlab_post_receive.rb
@@ -73,7 +73,12 @@ class GitlabPostReceive
changes = Base64.encode64(@changes)
queue = "#{config.redis_namespace}:queue:post_receive"
- msg = JSON.dump({ 'class' => 'PostReceive', 'args' => [@repo_path, @actor, changes], 'jid' => @jid })
+ msg = JSON.dump({
+ 'class' => 'PostReceive',
+ 'args' => [@repo_path, @actor, changes],
+ 'jid' => @jid,
+ 'enqueued_at' => Time.now.to_f
+ })
begin
GitlabNet.new.redis_client.rpush(queue, msg)