Skip to content

Commit

Permalink
Fix 'Task is already launched and is not completed' issue
Browse files Browse the repository at this point in the history
  • Loading branch information
BattlefieldDuck committed Nov 8, 2022
1 parent 671bbfb commit 9eed685
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions discordgsm/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,12 +64,13 @@ async def on_ready():
await sync_commands(whitelist_guilds)
await tasks_fetch_messages()

tasks_query.start()
if not tasks_query.is_running():
tasks_query.start()

if os.getenv('WEB_API_ENABLE', '').lower() == 'true':
if not cache_guilds.is_running() and os.getenv('WEB_API_ENABLE', '').lower() == 'true':
cache_guilds.start()

if os.getenv('HEROKU_APP_NAME') is not None:
if not heroku_query.is_running() and os.getenv('HEROKU_APP_NAME') is not None:
heroku_query.start()


Expand Down

0 comments on commit 9eed685

Please sign in to comment.