Hi all,

i have finally finished porting the spooler to the new api and i have
implemented some of the features users requested in the last months.

First of all i have renamed the function

uwsgi.send_to_spooler()

to

uwsgi.spool()

(the old one will remains available for backward compatibility)

The args can now be keywords.

So you can write

uwgsi.spool({'command':'send_mass_mail', 'group':'rich_customers'})

or a more elegant

uwsgi.spool(command='send_mass_mail',group='rich_customers')


Putting wrong kind of args in the spool request will now raise an exception

By default a spooler func will return uwsgi.SPOOL_RETRY, so in case of
errors the jobs are not lost.

When a spooler callable has finished doing its job it has to return
uwsgi.SPOOL_OK and the spool file will be deleted.

If more languages are in the stack, you can 'ignore' the spooler job
simply returning uwsgi.SPOOL_IGNORE (in this case the next plugin will try
managing it and so on)

The spooler is fully thread safe (all the tests have been done with
multithread apps)

Currently the spooler is supported only in the python plugin, but lua and
perl support will come out soon.

uwsgi signals are still not managed (it will be fixed next week), but you
can send signal from the spooler to workers if you need it.

I am currently investigating the possibility of executing spooler task in
parallel. More to come soon.

Thanks for testing
-- 
Roberto De Ioris
http://unbit.it
_______________________________________________
uWSGI mailing list
[email protected]
http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi

Reply via email to