flask
flask copied to clipboard
how to set flask session key value in multithreading
same code:-
def long_task(i):
# global session
print "started executing for {}".format(i)
time.sleep(5)
print "working"
session['step1'][i]["status"] = 'Completed'
executor.submit(long_task, current_app._get_current_object(), i)
Please use Stack Overflow for questions about your own code. This tracker is for issues related to the project itself. Be sure to include a minimal, complete, and verifiable example.