reduce amount of runs
This commit is contained in:
@@ -154,6 +154,7 @@ async def run(PROGRAM_ARGS):
|
|||||||
if safe_to_post_tweets:
|
if safe_to_post_tweets:
|
||||||
if await process_queue():
|
if await process_queue():
|
||||||
print("Finished processing queue")
|
print("Finished processing queue")
|
||||||
|
return
|
||||||
else:
|
else:
|
||||||
print('Posted no new tweets; we\'re caught up!')
|
print('Posted no new tweets; we\'re caught up!')
|
||||||
return
|
return
|
||||||
|
|||||||
+2
-2
@@ -11,8 +11,8 @@ def run(PROGRAM_ARGS):
|
|||||||
while True:
|
while True:
|
||||||
try:
|
try:
|
||||||
asyncio.run(catchup.run(PROGRAM_ARGS))
|
asyncio.run(catchup.run(PROGRAM_ARGS))
|
||||||
print('Sleeping for 10 minutes...')
|
print('Sleeping for 60 minutes...')
|
||||||
sleep(60*10) # run every 10 minutes
|
sleep(60*60) # run every hour
|
||||||
except KeyboardInterrupt:
|
except KeyboardInterrupt:
|
||||||
print('Interrupt signal received. Exiting listen mode.')
|
print('Interrupt signal received. Exiting listen mode.')
|
||||||
print(f'errors encountered throughout session.')
|
print(f'errors encountered throughout session.')
|
||||||
|
|||||||
Reference in New Issue
Block a user