diff options
| author | Alejandro RodrÃguez <alejorro70@gmail.com> | 2017-05-02 18:30:06 -0300 |
|---|---|---|
| committer | Alejandro RodrÃguez <alejorro70@gmail.com> | 2017-05-11 12:21:50 -0300 |
| commit | b3c8ffe634290044e810c614bac6c3726883944b (patch) | |
| tree | f07500275ba9b232da1dd824f51d8f8158715d3c /lib | |
| parent | ee259653e7a00359740ca36cef606f9c3cc1a7cb (diff) | |
| download | gitlab-shell-b3c8ffe634290044e810c614bac6c3726883944b.tar.gz | |
Setup use of gl-repository to enqueue PostReceive sidekiq jobs
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/gitlab_net.rb | 1 | ||||
| -rw-r--r-- | lib/gitlab_post_receive.rb | 5 |
2 files changed, 4 insertions, 2 deletions
diff --git a/lib/gitlab_net.rb b/lib/gitlab_net.rb index 1e60e24..66e9fd5 100644 --- a/lib/gitlab_net.rb +++ b/lib/gitlab_net.rb @@ -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/ 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 }) |
