gitlab-exporter 13.3.0 → 13.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/gitlab_exporter/sidekiq.rb +10 -8
- data/lib/gitlab_exporter/version.rb +1 -1
- 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: 5ffa16533118568301cba662228785262ac08d3fb58d85572b6a02199316732d
|
4
|
+
data.tar.gz: 26fe29073fb946867318bef4dd785653d6385ebd51fa8f8ae431bebab3daf3a8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d422202e989b82e4222a6bcc6610a2d62421da260e4a8e014b40458778ea0a64f135afb02269bb6f3513cea4cbeb3c127d3b917c6152c9c46f4403b241896f0f
|
7
|
+
data.tar.gz: e2a470642b3f97b3d9e19007bfeb365af4abe4fe7a71079a5fdcccae31939fa7b786c24a0f580c5f9a27c52edbb6c052bcea6055df89403d2e5c673caef3ee7c
|
data/Gemfile.lock
CHANGED
@@ -23,6 +23,9 @@ module GitLab
|
|
23
23
|
# needed to be re-initialized
|
24
24
|
POOL_TIMEOUT = 90
|
25
25
|
|
26
|
+
# Lock for Sidekiq.redis which we need to modify, but is not concurrency safe.
|
27
|
+
SIDEKIQ_REDIS_LOCK = Mutex.new
|
28
|
+
|
26
29
|
PrometheusMetrics.describe("sidekiq_enqueued_jobs",
|
27
30
|
"Total number of jobs enqueued by class name. Only inspects the first #{PROBE_JOBS_LIMIT} jobs per queue.") # rubocop:disable Layout/LineLength
|
28
31
|
|
@@ -211,16 +214,15 @@ module GitLab
|
|
211
214
|
end
|
212
215
|
|
213
216
|
def with_sidekiq(namespaced = true)
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
config.redis = self.class.connection_pool[redis_options(namespaced)]
|
219
|
-
end
|
217
|
+
SIDEKIQ_REDIS_LOCK.synchronize {
|
218
|
+
Sidekiq.configure_client do |config|
|
219
|
+
config.redis = self.class.connection_pool[redis_options(namespaced)]
|
220
|
+
end
|
220
221
|
|
221
|
-
|
222
|
+
return unless connected?
|
222
223
|
|
223
|
-
|
224
|
+
yield
|
225
|
+
}
|
224
226
|
end
|
225
227
|
|
226
228
|
def redis_options(namespaced = true)
|