summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDouglas Barbosa Alexandre <dbalexandre@gmail.com>2016-06-07 10:57:58 -0300
committerDouglas Barbosa Alexandre <dbalexandre@gmail.com>2016-06-07 10:57:58 -0300
commit59e5f4705b37014a2b3cc12959c3ac7e65328ec3 (patch)
tree7536bca31ce9072274c0c89fa8b429fd911379bd
parent3fd0b364ea54832a861482d609bd25d485d5ac9c (diff)
downloadgitlab-ce-gh-disable-webhooks.tar.gz
Check if GitHub rate limite API was reached before update Webhooksgh-disable-webhooks
-rw-r--r--lib/gitlab/github_import/importer.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/gitlab/github_import/importer.rb b/lib/gitlab/github_import/importer.rb
index 442b4c389fe..5ef9d66ba68 100644
--- a/lib/gitlab/github_import/importer.rb
+++ b/lib/gitlab/github_import/importer.rb
@@ -146,6 +146,7 @@ module Gitlab
def update_webhooks(hooks, options)
hooks.each do |hook|
+ sleep rate_limit_sleep_time if rate_limit_exceed?
client.edit_hook(repo, hook.id, hook.name, hook.config, options)
end
end