Answer the question
In order to leave comments, you need to log in
Flask + gunicorn multithreading not working?
function body:
@app.route('/allusers')
def all():
buff = []
for u in User.query.all():
buff.append([u.username, u.email, u.password])
print("before")
time.sleep(10)
print("after")
return str(buff)
gunicorn --bind 0.0.0.0:6789 main_app:app -w 3 --threads 12
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question