> 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!
>

Celery and the uWSGI spooler do the same thing but with completely
different techniques.

Celery requires some sort of queuing system (rabbitmq, beanstalkd...) and
a daemon to manage tasks. The spooler does not need maintainance (it is
only a dir), does not need external queueing system and can process
pratically an unlimited number of tasks without growing in memory.

The downside is that it is obviously raw (very raw). The uWSGI spirit is
implementing very raw api/infrastructure on which the user will build
something more friendly.

Another limit of the spooler is the lack of concurrency, So it executes
only one task at a time (the celery daemon starts with 8 workers).
This will be fixed relatively soon. Another problem is that it (currently)
does not have a working priority system (will be fixed very soon, thanks
to a user idea).

So, if you care of resources and can invest time developing a good spooler
function, you can go for the spooler (in the next release you will find
various improvements too). Otherwise celery is a really good tool (if not
the best one) for long-running task.

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

Reply via email to