Skip to content

Commit e977d93

Browse files
bdribaultbdribault
bdribault
authored andcommitted
Increase prometheus timeout during initialization
1 parent 1470825 commit e977d93

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/process.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ async def load_metric(metric: Metrics, timestamp, options: Options):
4040
+ metric.get_recatch_query()
4141
+ f"&start={start}&end={timestamp}&step=15s"
4242
)
43-
data = await prom.fetch(query)
43+
data = await prom.fetch(query, timeout=40.0)
4444

4545
# Store the values and timestamp of the output metrics
4646
recatch_dots_by_key = {}
@@ -64,7 +64,7 @@ async def load_metric(metric: Metrics, timestamp, options: Options):
6464
+ metric.get_query()
6565
+ f"&start={start}&end={timestamp}&step=15s"
6666
)
67-
data = await prom.fetch(query, timeout=40.0)
67+
data = await prom.fetch(query, timeout=80.0)
6868

6969
for element in data:
7070
labels = element["metric"]
@@ -73,7 +73,6 @@ async def load_metric(metric: Metrics, timestamp, options: Options):
7373
values = element["values"]
7474

7575
if key in recatch_dots_by_key:
76-
7776
# Store the last seen input counter
7877
metric.previous_values_by_key[key] = float(values[-1][1])
7978

0 commit comments

Comments
 (0)