I need to execute Process during request like below
@app.route('/test')
def test_process():
print "starting new process"
p = Process(target=do_long_extra_job)
p.start()
return "this is response"
do_long_extra_job is on another process, so expected work flow is like this
- start a process
- response
- long running extra job finished
but actual flow is like this
- stat a process
- long running extra job finished
- response
how can I response immediately after starting new process?