reduce amount of runs
This commit is contained in:
+2
-1
@@ -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
@@ -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.')
|
||||
|
||||
Reference in New Issue
Block a user