[Dancer-users] do something after sending response

thecrux at gmail.com thecrux at gmail.com
Fri Aug 12 13:31:32 CEST 2011


On Thu, Aug 11, 2011 at 10:54:33PM +0600, Nick Knutov wrote:
> Hello all,
> 
> is it possible to run some code after sending response to upstream [and 
> closing socket] with Dancer?
> 
> For example: I want to get request, send response and after closing 
> socket to back-end do some job with big timeouts: write logs, send 
> notifications via emails, etc.

Hi.

For example you can use AnyEvent::Gearman::Client in your Dancer app
and twiggy as a backend web-server (AnyEvent based), Gearman as a
job-server and AnyEvent::Gearman::Worker for worker daemon.

(Dind't check that scheme, but will try to)

-- 
Vladimir Lettiev aka crux ✉ theCrux at gmail.com


More information about the Dancer-users mailing list