Bogdanp / django_dramatiq

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

unable to pass parameters to middleware #157

Closed tarheel closed 4 weeks ago

tarheel commented 7 months ago

Is there any way to pass static arguments to middleware constructors? E.g. if I include dramatiq.middleware.Retries in my MIDDLEWARE list under DRAMATIQ_BROKER, can I set max_backoff or max_retries to a non-default value?

The README doesn't mention a way to do this. It does explain how to pass dynamic arguments, but that doesn't seem to work either. If I follow the example, I hit an error:

AttributeError: type object 'CustomDjangoDramatiqConfig' has no attribute 'initialize'