reduce amount of runs

This commit is contained in:
muskit
2023-08-28 23:29:27 -07:00
parent c81047b748
commit 4f519a9f55
2 changed files with 4 additions and 3 deletions
+2 -1
View File
@@ -154,6 +154,7 @@ async def run(PROGRAM_ARGS):
if safe_to_post_tweets:
if await process_queue():
print("Finished processing queue")
return
else:
print('Posted no new tweets; we\'re caught up!')
return
@@ -178,4 +179,4 @@ async def run(PROGRAM_ARGS):
await queue_loop()
except KeyboardInterrupt:
print('Interrupt received. Ending catchup mode...')
return False
return False
+2 -2
View File
@@ -11,8 +11,8 @@ def run(PROGRAM_ARGS):
while True:
try:
asyncio.run(catchup.run(PROGRAM_ARGS))
print('Sleeping for 10 minutes...')
sleep(60*10) # run every 10 minutes
print('Sleeping for 60 minutes...')
sleep(60*60) # run every hour
except KeyboardInterrupt:
print('Interrupt signal received. Exiting listen mode.')
print(f'errors encountered throughout session.')