yfinance-exporter 1.0.3__py3-none-any.whl → 1.0.5__py3-none-any.whl
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.
@@ -0,0 +1,4 @@
|
|
1
|
+
yfinance_exporter.py,sha256=PfVap2jhccZG5WW6kvyq-hnIBttIsQRhbh3D1NB0Q7Y,3569
|
2
|
+
yfinance_exporter-1.0.5.dist-info/METADATA,sha256=wXKHV5CgN65n99bWEwoY6CZLEsoIAA136Z7wu7PMxJc,1525
|
3
|
+
yfinance_exporter-1.0.5.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
4
|
+
yfinance_exporter-1.0.5.dist-info/RECORD,,
|
yfinance_exporter.py
CHANGED
@@ -94,6 +94,7 @@ def main():
|
|
94
94
|
DAEMON.labels(status="item-count", **labels).set(len(conf.stocks))
|
95
95
|
|
96
96
|
labels["section"] = "exec"
|
97
|
+
in_loop_interval = int(conf.loop.interval / (len(conf.stocks) + 1)) or 1
|
97
98
|
while True:
|
98
99
|
start = datetime.now()
|
99
100
|
DAEMON.labels(status="items-ok", **labels).set(0)
|
@@ -104,11 +105,12 @@ def main():
|
|
104
105
|
DAEMON.labels(status="items-ok", **labels).inc()
|
105
106
|
else:
|
106
107
|
DAEMON.labels(status="items-ko", **labels).inc()
|
108
|
+
time.sleep(in_loop_interval)
|
107
109
|
|
108
110
|
exec_interval = (datetime.now() - start).total_seconds()
|
109
111
|
DAEMON.labels(status="exec-time", **labels).set(exec_interval)
|
110
112
|
DAEMON.labels(status="loop-count", **labels).inc()
|
111
|
-
interval = conf.loop.interval - exec_interval
|
113
|
+
interval = int(conf.loop.interval - exec_interval)
|
112
114
|
if interval > 0:
|
113
115
|
time.sleep(interval)
|
114
116
|
|
@@ -1,4 +0,0 @@
|
|
1
|
-
yfinance_exporter.py,sha256=1v2IUqGt6oUqmWnjdIVNNCAM2vUSiWCBuEJfuxUCEIM,3446
|
2
|
-
yfinance_exporter-1.0.3.dist-info/METADATA,sha256=MQg3m5G22aN5pH9XJzYPJk3PXA11vnf3505PDdrRyZk,1525
|
3
|
-
yfinance_exporter-1.0.3.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
4
|
-
yfinance_exporter-1.0.3.dist-info/RECORD,,
|
File without changes
|