mirror of
https://github.com/migatu/conjurer.git
synced 2026-07-15 14:22:13 +00:00
aaa
This commit is contained in:
@@ -579,7 +579,7 @@ async def check_music():
|
|||||||
await asyncio.sleep(2)
|
await asyncio.sleep(2)
|
||||||
|
|
||||||
|
|
||||||
@tasks.loop(seconds=2)
|
@tasks.loop(seconds=120)
|
||||||
async def check_data():
|
async def check_data():
|
||||||
"""
|
"""
|
||||||
The function `check_data` periodically checks for conditions to send messages and manage log files
|
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 LAST_SPONTANEOUS_CALL
|
||||||
global TIME_BETWEEN_CALLS
|
global TIME_BETWEEN_CALLS
|
||||||
tdelta = datetime.now() - LAST_SPONTANEOUS_CALL
|
tdelta = datetime.now() - LAST_SPONTANEOUS_CALL
|
||||||
logger.info(TIME_BETWEEN_CALLS)
|
|
||||||
tdelta = tdelta.total_seconds()
|
tdelta = tdelta.total_seconds()
|
||||||
logger.info(tdelta)
|
|
||||||
if tdelta > TIME_BETWEEN_CALLS:
|
if tdelta > TIME_BETWEEN_CALLS:
|
||||||
logger.info("Spontaneous call")
|
logger.info("Spontaneous call")
|
||||||
TIME_BETWEEN_CALLS = random.randint(7200,172800) #temp random, set after each call
|
TIME_BETWEEN_CALLS = random.randint(7200,172800) #temp random, set after each call
|
||||||
|
|||||||
Reference in New Issue
Block a user