This commit is contained in:
2024-03-29 23:02:42 +01:00
parent bbca7dbad7
commit b2fc71db34
+1 -3
View File
@@ -579,7 +579,7 @@ async def check_music():
await asyncio.sleep(2)
@tasks.loop(seconds=2)
@tasks.loop(seconds=120)
async def check_data():
"""
The function `check_data` periodically checks for conditions to send messages and manage log files
@@ -648,9 +648,7 @@ async def check_data():
global LAST_SPONTANEOUS_CALL
global TIME_BETWEEN_CALLS
tdelta = datetime.now() - LAST_SPONTANEOUS_CALL
logger.info(TIME_BETWEEN_CALLS)
tdelta = tdelta.total_seconds()
logger.info(tdelta)
if tdelta > TIME_BETWEEN_CALLS:
logger.info("Spontaneous call")
TIME_BETWEEN_CALLS = random.randint(7200,172800) #temp random, set after each call