django-postgres-queue
django-postgres-queue copied to clipboard
Run worker with django autoreloader by default
I thought it would be a neat addition to support auto-reload like django-admin runserver does. That is usually what you want while developing.
Good idea, but I don't think it should be the default
Good idea, but I don't think it should be the default
Fair enough :)
I've also been thinking of adding support for watchfiles. Having more reloader options also promotes not having a default I think.
If autoreloading is already in Django, what's the point of using something else?
It's a bit hacky to hook into the Django autoreloader since it's not really designed for that. Watchfiles also performs better than the reloader mechanism built into Django from my experience.
I've changed it to opt-in as you proposed 🙂 Use --reload to enable autoreload.
Regarding watchfiles, I guess this would use watchfiles implicitly if the django project were using django-watchfiles.