File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -33,6 +33,7 @@ def __init__(
33
33
self .store = store
34
34
self .insecure = insecure
35
35
self .timeout = timeout
36
+ self .collect_semaphore = False
36
37
37
38
# helpers for default schema
38
39
if not self .host .startswith ("http" ):
@@ -53,6 +54,12 @@ def collect(self):
53
54
http://docs.ceph.com/docs/master/radosgw/adminops/#get-bucket-info
54
55
"""
55
56
57
+ if self .collect_semaphore :
58
+ logging .debug ("Previous collection still in progress at time "
59
+ f"{ time .time ()} , cancelling collection." )
60
+ return
61
+ self .collect_semaphore = True
62
+
56
63
start = time .time ()
57
64
# setup empty prometheus metrics
58
65
self ._setup_empty_prometheus_metrics ()
@@ -84,6 +91,8 @@ def collect(self):
84
91
for metric in list (self ._prometheus_metrics .values ()):
85
92
yield metric
86
93
94
+ self .collect_semaphore = False
95
+
87
96
def _session (self ):
88
97
"""
89
98
Setup Requests connection settings.
You can’t perform that action at this time.
0 commit comments