(de)serialization and queuing works now

This commit is contained in:
muskit
2023-08-17 02:28:29 -07:00
parent dd4578708a
commit 3c93ca18c2
10 changed files with 163 additions and 188 deletions
+6 -4
View File
@@ -8,7 +8,6 @@ import nest_asyncio
import talent_lists
import ttweetqueue as ttq
import api_secrets
import catchup
import listen
from twapi import TwAPI
@@ -52,6 +51,8 @@ async def async_main():
await self_destruct()
elif mode == 'cmd':
command_line()
elif mode in ['l', 'listen']:
listen.run()
else:
print('\nunknown mode. run with no arguments or -h for help and modes')
@@ -59,9 +60,9 @@ def main():
global PROGRAM_ARGS
parser = init_argparse()
# if len(sys.argv) < 2:
# parser.print_help()
# return
if len(sys.argv) < 2:
parser.print_help()
return
PROGRAM_ARGS = parser.parse_args()
@@ -77,6 +78,7 @@ def main():
ttq.TalentTweetQueue()
## Asynchronous execution
print('beginning async main')
nest_asyncio.apply()
asyncio.run(async_main())