sono stupido
This commit is contained in:
@@ -5,7 +5,7 @@ import logging
|
||||
import json
|
||||
import routeros_api
|
||||
|
||||
from pyutils.utils import *
|
||||
from utils import *
|
||||
from influxdb_client_3 import InfluxDBClient3, Point
|
||||
|
||||
# Get environment variables
|
||||
@@ -65,7 +65,10 @@ def main() -> int:
|
||||
if_stats_old = if_stats
|
||||
LOGGER.debug(f"\nInterfaces: {json.dumps(if_stats, indent = 2)}")
|
||||
LOGGER.debug(f"\nResources: {json.dumps(hw_stats, indent = 2)}")
|
||||
time.sleep(INTERVAL-(last-now))
|
||||
last: float = time.time()
|
||||
cycle_time: float = last - now
|
||||
LOGGER.debug(f"Cycle Time: {cycle_time:4.3f}")
|
||||
time.sleep(INTERVAL-cycle_time)
|
||||
except Exception as e:
|
||||
print(f"Unexpected exception: [{e}]")
|
||||
return 1
|
||||
|
||||
Reference in New Issue
Block a user