Skip to content

Commit

Permalink
Refactor main.py to use a separate function for the main loop
Browse files Browse the repository at this point in the history
  • Loading branch information
appujet committed Apr 9, 2024
1 parent 2890975 commit 241f50a
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -238,9 +238,10 @@ async def main():
await db.disconnect()


async def loop_main():
async def run_main_loop():
while True:
asyncio.run(main())
await main()
await asyncio.sleep(60)

asyncio.run(loop_main())
# Run the event loop
asyncio.run(run_main_loop())

0 comments on commit 241f50a

Please sign in to comment.