Large Problems in Django, Mostly Solved: Delayed Execution
ericholscher.com
ericholscher.com
I wrote a small library for Django that makes writing jobs for beanstalkd easier (http://github.com/jonasvp/django-beanstalkd). There's also a management command for starting (threaded) workers. Makes writing and calling jobs from Django very simple.
Btw, If you would be interested in writing a beanstalkd backend for celery I would be happy to help you out!
I'm happy with my lightweight model for now but I'll definitely look into celery again, when the need arises.
It supports multiple messaging queues and backends for storing results (RabbitMQ, MongoDB, AMQP, Redis, ... - I personally use Redis, because I don't need all the features and overhead from RabbitMQ) and also has a great documentation and friendly support on IRC.
And if you watch the Celery project on github you can see that the author is basically working and improving the project on daily basis.
Also, is that like Quarts in the Spring Framework?
This isn't about threading, really. I'll explain it in terms of Rails's delayed_job because I'm not familiar with the details of Celery:
* Let's say I want to send an email, via the function Mailer.deliver_notice(email)
* With delayed_job, I turn this call into Mailer.delay.deliver_notice(email). This puts an entry into a Jobs table in the database that makes note of what I want to run, with all the details.
* In the background, I have a daemon running that checks the Jobs table every five seconds for jobs that need to be run. It uses the information in the table to execute the deliver_notice function.
* That's it.
In many cases, the job will update some sort of field in your model that you can query to see if it's been run yet or not.