Hi,
Take
a look at ngx.eof() [1]. The client timeout you're seeing might depend
on the protocol version of the request or the client.
I
ended up with quite an over-engineered solution for background work,
because I have tasks which *must* be completed, and cannot be dropped
etc. For this, I wrote a binding [2] to qless-core [3], which is a Redis
based job/queue system implemented as Lua scripts within Redis. I run
workers [4] for this in init_worker_by_lua, which pick off the jobs and
process them reliably. So this is quite complicated, but reliable.
James.
Is it possible to launch an asynchronous task and then to immediately
return a response to the HTTP request that I received?
Thank you
Bogdan