Skip to content

Commit 608717e

Browse files
committed
Add variable for polling interval
1 parent a05c530 commit 608717e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

prometheus_fuel_exporter.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,7 @@ def collect(self):
130130
balance_owner = os.environ.get("BALANCE_OWNER", "N/A")
131131
balance_asset_id = os.environ.get("BALANCE_ASSET_ID", "N/A")
132132
faucet_url = os.environ.get("FAUCET_URL", "N/A")
133+
polling_interval = os.environ.get('POLLING_INTERVAL', '1000')
133134

134135
logger.debug("CONFIG:network: " + network)
135136
logger.debug("CONFIG:app_port: " + app_port)
@@ -145,4 +146,4 @@ def collect(self):
145146
REGISTRY.register(FuelCollector(network, graphql_url, balance_owner, balance_asset_id, faucet_url))
146147

147148
while True:
148-
time.sleep(1)
149+
time.sleep(polling_interval / 1000)

0 commit comments

Comments
 (0)