Bogdanp / django_dramatiq

A Django app that integrates with Dramatiq.
https://dramatiq.io
Other
347 stars 77 forks source link

A newcomer's question #16

Closed beigna closed 6 years ago

beigna commented 6 years ago

I'm using dramatiq with Flask (and It's fantastic).

This package is mandatory to enqueue tasks (that use the Django's ORM) of a django project?

I want to know if I can define my tasks on a simple tasks.py, call them from a Django's views and then execute the workers with ./dramatiq task_name instead of ./manage.py rundramatiq

Excepting the Broker's settings and the pytest-django integration. What is the real advangage of this package?

Thanks!

Bogdanp commented 6 years ago

It's not mandatory, but you'll probably end up duplicating much of the functionality yourself if you don't use it. Specifically, you'll need something like DbConnectionMiddleware to properly close db connections and you'll need to set up settings yourself. I'd recommend just using this package if you want to use Dramatiq with Django. :)

beigna commented 6 years ago

Thanks you @Bogdanp Dramatiq is the best Package of 2018!