Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

This is great! The prev recommendation was usually a lib called celery that I wasn't able to get working. I don't remember the details, but it had high friction points or compatibility barriers I wasn't able to overcome. This integration fits Django's batteries included approach.

I've been handling this, so far, with separate standalone scripts that hook into Django's models and ORM. You have to use certain incantations in an explicit order at the top of the module to make this happen.





> scripts that hook into Django's models and ORM

Django has management commands for that [1].

When you use Django over time, you experience this pleasant surprise over and over when you need something, “oh, Django already has that”

[1] https://docs.djangoproject.com/en/5.2/howto/custom-managemen...


Celery generally works best with the redis backend.

The main thing when it comes to models is that you pass the ids not the model instances themselves when passing to celery jobs.

This is because the celery worker could be running somewhere else entirely.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: