Reputation: 18473
I develop a django app where lots of DB updates could/should be deferred to later time.
What would be a good way to update the DB in a background batch job?
One way I could think of is to have a message queue that would contain raw SQL statements.
The django app would fill the queue with raw SQLs when the update should be done asynchronously.
A simple background job, (in a different un-related process), would just deqeue and execute the SQL statements it in its own pace..
What do you think?
Upvotes: 0
Views: 235
Reputation: 18473
I've found this good review about the subject. It recommends Gearman
Seems a lighter solution than Celery.. I think I will give it a try
Upvotes: 0
Reputation: 391820
Celery is often used for this.
Start with this related questions: https://stackoverflow.com/questions/tagged/celery.
Upvotes: 4