Commit b3c8ffe6 authored by Alejandro Rodríguez's avatar Alejandro Rodríguez

Setup use of gl-repository to enqueue PostReceive sidekiq jobs

parent ee259653
......@@ -27,7 +27,6 @@ class GitlabNet
env: env
}
if actor =~ /\Akey\-\d+\Z/
params.merge!(key_id: actor.gsub("key-", ""))
elsif actor =~ /\Auser\-\d+\Z/
......
......@@ -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
})
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment