Open RealOrangeOne opened 4 months ago
I don't know if it's unutterably evil, but you could always make it so django-tasks
monkey-patches itself into django.tasks
, so you just do import django_tasks
in settings.py
and in all actual code you then always use django.tasks
regardless of whether you're using an existing version of Django or a future version that has tasks built-in.
django-tasks
anddjango.tasks
should be able to exist at the same time in a given project. However, a task defined withdjango-tasks.task
should be usable with a connection and backend fromdjango.tasks
(and vice versa).I believe all of the use cases should pull from the connection, and thus the backend, however this will need verifying. If needs-be, we can stub out the internal connection to use the one from
django.tasks
if it exists, however this may cause issues if there's an explicit need to usedjango-tasks
.