Multi-Threading Not Working In Flask

I have a print statement in the main body of the program which works. I have this code as well:

if name == “main”:
model_thread = threading.Thread(target=two_day_model_runner, daemon=True)
update_value_thread = threading.Thread(target=update_ticker_values, daemon=True)
update_value_thread.start()
model_thread.start()

app.run(port=8080, debug=True, use_reloader=False)

Inside two_day_model_runner() i have a print statement:

def two_day_model_runner():
print(“The thread is running…”)

this print statement does not get printed.
This is on the free tier if that matters.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.