Hello!
On Wed, May 30, 2012 at 9:28 PM, Sparsh Gupta <spars...@gmail.com> wrote:
> Well I am writing code for a particular location in lua but I want
> that code to get processed asynchronously. Ideally what I will want is
> something like:
>
> location = /log {
> empty_gif; #I want the connection to close now as there is no
> response that needs to be sent to the request
>
> content_by_lua '
> -- Here I will use all the GET
> parameters sent and process it and log it whereever I want to. This
> can take time and ofcourse I dont want people to wait for this
> ';
> }
>
>
> Do you have a scenario where this can work easily. Currently in PHP we
> use ob_flush followed by queue system but thats kinda pain.
>
The short answer is no. Check out the following thread on the
openresty mailing list for a work-around involving ngx.eof() to this
issue:
https://groups.google.com/group/openresty/browse_thread/thread/7fc9320d9f221c59
It's in Chinese though, you can use Google Translate or something like
that to convert it to some other language you're comfortable with.
Regards,
-agentzh
P.S. I'm cc'ing the openresty mailing list so that people can see this
discussion.