Skip to content

Commit

Permalink
Fix again worker thread
Browse files Browse the repository at this point in the history
  • Loading branch information
Salamandar committed Nov 3, 2024
1 parent d3c163e commit 64d4bd4
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions run.py
Original file line number Diff line number Diff line change
Expand Up @@ -1865,6 +1865,12 @@ def set_config(config="./config.py"):

if __name__ == "__main__":
set_config()
app.run("localhost", port=app.config.PORT, debug=app.config.DEBUG)


if __name__ == "__mp_main__":
# Worker thread
set_config()

if app.config.MONITOR_APPS_LIST:
app.add_task(
Expand All @@ -1877,12 +1883,6 @@ def set_config(config="./config.py"):
if app.config.MONTHLY_JOBS:
app.add_task(launch_monthly_job())

app.add_task(jobs_dispatcher())
# app.add_task(number_of_tasks())
# tracemalloc.start()
app.run("localhost", port=app.config.PORT, debug=app.config.DEBUG)


if __name__ == "__mp_main__":
# Workers thread
set_config()
app.add_task(jobs_dispatcher())

0 comments on commit 64d4bd4

Please sign in to comment.