Actually that's what I need :)
Got it working finally:
added

<pp>/home/projects/sites/tour</pp>
<module>runsitespooler</module>

to uwsgi.xml

and created /home/projects/sites/tour/runsitespooler.py where put the "calculation" function.
Working perfectly.

P.S. Do you know any performance measures for this feature? I doubt if to use "celery" with django or spooler of uwsgi, I found both are OK. If it will be problem to run 1000-2000 long-time tasks simultaneously with spooler?
Thanks!

On 06/23/2011 01:46 PM, Roberto De Ioris wrote:

Yeah, sure.

/etc/uwsgi.xml:

<uwsgi>
<vhost></vhost>
<master></master>
<socket>127.0.0.1:8013</socket>
<enable-threads/>
<spooler>/home/projects/sites/spooler</spooler>
<close-on-exec/>
</uwsgi>


part of nginx:
uwsgi_pass   127.0.0.1:8013;
          include        uwsgi_params;
          uwsgi_param UWSGI_CHDIR /home/projects/sites/tour;
          uwsgi_param UWSGI_SCRIPT runsite;
          uwsgi_param UWSGI_PYHOME /home/projects/sites/tour;





Oh, you cannot create spooler tasks dinamically. You have to load it on
startup. Use the --module directive (you can obviously continue to use
dynamic mode, but spooler callable must be created on startup)


_______________________________________________
uWSGI mailing list
[email protected]
http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi

Reply via email to