summaryrefslogtreecommitdiff
path: root/lib/gitlab_post_receive.rb
diff options
context:
space:
mode:
authorAlejandro Rodríguez <alejorro70@gmail.com>2017-05-02 18:30:06 -0300
committerAlejandro Rodríguez <alejorro70@gmail.com>2017-05-11 12:21:50 -0300
commitb3c8ffe634290044e810c614bac6c3726883944b (patch)
treef07500275ba9b232da1dd824f51d8f8158715d3c /lib/gitlab_post_receive.rb
parentee259653e7a00359740ca36cef606f9c3cc1a7cb (diff)
downloadgitlab-shell-b3c8ffe634290044e810c614bac6c3726883944b.tar.gz
Setup use of gl-repository to enqueue PostReceive sidekiq jobs
Diffstat (limited to 'lib/gitlab_post_receive.rb')
-rw-r--r--lib/gitlab_post_receive.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/gitlab_post_receive.rb b/lib/gitlab_post_receive.rb
index 403d281..e987019 100644
--- a/lib/gitlab_post_receive.rb
+++ b/lib/gitlab_post_receive.rb
@@ -107,11 +107,14 @@ class GitlabPostReceive
def update_redis
# Encode changes as base64 so we don't run into trouble with non-UTF-8 input.
changes = Base64.encode64(@changes)
+ # TODO: Change to `@gl_repository || @repo_path` in next release.
+ # See https://gitlab.com/gitlab-org/gitlab-shell/merge_requests/130#note_28747613
+ project_identifier = @repo_path
queue = "#{config.redis_namespace}:queue:post_receive"
msg = JSON.dump({
'class' => 'PostReceive',
- 'args' => [@repo_path, @actor, changes],
+ 'args' => [project_identifier, @actor, changes],
'jid' => @jid,
'enqueued_at' => Time.now.to_f
})