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'
Is there any way to pass static arguments to middleware constructors? E.g. if I include
dramatiq.middleware.Retries
in myMIDDLEWARE
list underDRAMATIQ_BROKER
, can I setmax_backoff
ormax_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: