Skip to content
Snippets Groups Projects
Commit b3c8ffe6 authored by Alejandro Rodríguez's avatar Alejandro Rodríguez
Browse files

Setup use of gl-repository to enqueue PostReceive sidekiq jobs

parent ee259653
No related branches found
No related tags found
1 merge request!130Handle GL_REPOSITORY env variable and use it in api calls
Loading
Loading
@@ -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/
Loading
Loading
Loading
Loading
@@ -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
})
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment