zz-export-pull-requests 0.3.12 → 0.3.13
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/epr +5 -3
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9f0b0218f985b34ef2679b26aa3c8dfacecfafc2748837be00f74570107b55f4
|
4
|
+
data.tar.gz: 07d50bd0c52e1691fdb155189b985e1efab51722a909a34798369351e3767ab7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c14ec59d6658917b7abe596b79f8bb065f62100da14810072a8e850cef7b3397843e4a76b97e8b3edd7d8e189fa823c8cd0cefa959e30257854727dc39ce8da9
|
7
|
+
data.tar.gz: fa142a59ad0af9c14ed3af2a7257ee0e0de395bbd54f654391d363238d9cf0d41996aadcc54779477ee6be4f1eef4966a0416a838172462ec79e12cc15f9ec07
|
data/bin/epr
CHANGED
@@ -10,7 +10,7 @@ require "github_api"
|
|
10
10
|
require "gitlab"
|
11
11
|
require "bitbucket_rest_api"
|
12
12
|
|
13
|
-
VERSION = "0.3.
|
13
|
+
VERSION = "0.3.13"
|
14
14
|
SERVICES = %w[github gitlab bitbucket]
|
15
15
|
GIT_CONFIGS = %w[epr.token github.oauth-token]
|
16
16
|
|
@@ -93,7 +93,7 @@ end
|
|
93
93
|
|
94
94
|
def sleep_if_limit_reached
|
95
95
|
executions = $redis.get("bb-executed").to_i
|
96
|
-
$redisLogger.info("We have called the API for #{executions} times")
|
96
|
+
$redisLogger.info("We have called the API for #{executions} times") if ENV['SHOW_LOGS']
|
97
97
|
|
98
98
|
if executions >= BITBUCKET_RATE_LIMIT
|
99
99
|
now = Time.now
|
@@ -101,7 +101,9 @@ def sleep_if_limit_reached
|
|
101
101
|
one_hour = 1*60*60
|
102
102
|
later = now + one_hour
|
103
103
|
later_formatted = later.strftime("%I:%M:%S")
|
104
|
-
|
104
|
+
if ENV['SHOW_LOGS']
|
105
|
+
$redisLogger.info("#{now_formatted} - Rate limit reached. Will pause for an hour and will resume at #{later_formatted}.")
|
106
|
+
end
|
105
107
|
sleep one_hour
|
106
108
|
$redis.set("bb-executed", 0)
|
107
109
|
end
|