Closed vjMagar closed 5 years ago
Hi @vjMagar, can you provide a minimal example where this breaks? I'm not sure this is an actual issue since RedisBroker
does take a middleware
keyword argument, so it should no be passed to StrictRedis
. The only way I can see this happening is if you have a middleware
key in your OPTIONS
dictionary of your broker settings.
Hi @Bogdanp,
Yes! you are right, I went back to the setting and it turns out that I did typo in the DRAMATIQ_BROKER key.
Folllowing the local setting which I have used in the settings.py
DRAMATIQ_BROKER = {
"BROKER": "dramatiq.brokers.redis.RedisBroker",
"OPTIONS": {
"url": "redis://localhost:6379",
"MIDDLEWARE": [
"dramatiq.middleware.Prometheus",
"dramatiq.middleware.AgeLimit",
"dramatiq.middleware.TimeLimit",
"dramatiq.middleware.Callbacks",
"dramatiq.middleware.Retries",
"django_dramatiq.middleware.AdminMiddleware",
"django_dramatiq.middleware.DbConnectionsMiddleware",
],
},
}
In this case this was causing trouble. The DRAMATIQ_BROKER setting must been
DRAMATIQ_BROKER = {
"BROKER": "dramatiq.brokers.redis.RedisBroker",
"OPTIONS": {
"url": "redis://localhost:6379",
},
"MIDDLEWARE": [
"dramatiq.middleware.Prometheus",
"dramatiq.middleware.AgeLimit",
"dramatiq.middleware.TimeLimit",
"dramatiq.middleware.Callbacks",
"dramatiq.middleware.Retries",
"django_dramatiq.middleware.AdminMiddleware",
"django_dramatiq.middleware.DbConnectionsMiddleware",
],
}
I am closing this pull request, as this was simple case of typo on my end. Thanks @Bogdanp
This is PR for fixing the configuration issue when using redis as broker.
This PR will fixes this issus.