Il giorno 07/set/2012, alle ore 18:01, Ævar Arnfjörð Bjarmason <[email protected]> ha scritto:
> On Fri, Sep 7, 2012 at 4:45 PM, Roberto De Ioris <[email protected]> wrote: >> >> Il giorno 07/set/2012, alle ore 16:26, Ævar Arnfjörð Bjarmason >> <[email protected]> ha scritto: >> >>> Is uWSGI capable of providing support for something like the proposed >>> psgi cleanup handlers: >>> https://github.com/plack/psgi-specs/wiki/Proposal:-PSGI-environment-cleanup-handlers >>> >>> I.e. having your application send all the relevant content to the >>> client, but then run other code that the client doesn't have to wait >>> on? E.g. code that sends statistics to a logging server, sets various >>> keys in memcached, possibly inserts some things into a database lazily >>> etc. >>> _______________________________________________ >>> uWSGI mailing list >>> [email protected] >>> http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi >> >> >> This is how psgix.harakiri.commit is implemented: >> >> http://projects.unbit.it/uwsgi/browser/plugins/psgi/psgi_plugin.c#L482 >> >> Adding other 'things to do' is a mater of adding a perl_call line in that >> function. >> >> Sadly i have seen no more news regarding official PSGI cleanup handlers, so >> i think >> the only solution is doing as we already did with the python plugin, and use >> uwsgi::after_req_hook >> mapping to a code ref > > Thanks Roberto, do you have any immediate plans to implement this? If > not I'll just go for it, either by adding a uwsgi::* function as you > described or just by implementing that psgi proposal. > If the PSGI author confirms me that this is an almost-approved standard, it is a matter of 5 minutes :) Otherwise i think a uWSGI-specific solution could be implemented. -- Roberto De Ioris http://unbit.it JID: [email protected] _______________________________________________ uWSGI mailing list [email protected] http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi
