diff options
author | Alejandro RodrÃguez <alejorro70@gmail.com> | 2017-02-05 15:23:28 -0300 |
---|---|---|
committer | Alejandro RodrÃguez <alejorro70@gmail.com> | 2017-02-07 18:05:52 -0300 |
commit | b98d59acdf6453708ec53e38146238cab9f9754c (patch) | |
tree | 741896b1285ea9f595de8642704a69a81a3c7b0f /lib/gitlab_net.rb | |
parent | f61bdfe39c6b0618144f369d5cf4df1099be9948 (diff) | |
download | gitlab-shell-b98d59acdf6453708ec53e38146238cab9f9754c.tar.gz |
Add gitaly notification on post-receive hook
Diffstat (limited to 'lib/gitlab_net.rb')
-rw-r--r-- | lib/gitlab_net.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/gitlab_net.rb b/lib/gitlab_net.rb index e06557c..e8377cc 100644 --- a/lib/gitlab_net.rb +++ b/lib/gitlab_net.rb @@ -93,6 +93,14 @@ class GitlabNet {} end + def notify_post_receive(repo_path) + resp = post("#{host}/notify_post_receive", repo_path: repo_path) + + resp.code == '200' + rescue + false + end + def redis_client redis_config = config.redis database = redis_config['database'] || 0 |