dom96/jester — pull request #13 by ithkuil (2014-03-16 04:58:48+00:00)
Title: ttyl and finished templates to leave the socket open and respond later

Some of my routes are going to be processed using some other processes because they are long running so I needed a way to have it leave the socket open. However I am still using the jester features like the resp template and redirect.

I am storing the response object in a TTable and putting the request data in a redis-based message queue. Then at the end of my route I write `ttyl` which makes it leave the socket open. Then when I get a callback from my message queue module with a new message I pull the response out of the table and use the normal jester stuff, then write `finished` and that sends the data and closes the socket.

This is how I am using it https://gist.github.com/ithkuil/9578737