mirror of
https://github.com/django-q2/django-q2.git
synced 2026-10-06 21:38:12 +08:00
empty dictionary as configuration value for SQS
The [documentation](https://django-q.readthedocs.io/en/latest/configure.html#sqs-configuration) lists all keys as optional, but the way `get_broker` is implemented it will evaluate to false and return Redis. One way around this would be checking if the type of `Conf.SQS` is `dict`.
This commit is contained in:
@@ -176,7 +176,7 @@ def get_broker(list_key: str = Conf.PREFIX) -> Broker:
|
|||||||
|
|
||||||
return ironmq.IronMQBroker(list_key=list_key)
|
return ironmq.IronMQBroker(list_key=list_key)
|
||||||
# SQS
|
# SQS
|
||||||
elif Conf.SQS:
|
elif type(Conf.SQS) == dict:
|
||||||
from django_q.brokers import aws_sqs
|
from django_q.brokers import aws_sqs
|
||||||
|
|
||||||
return aws_sqs.Sqs(list_key=list_key)
|
return aws_sqs.Sqs(list_key=list_key)
|
||||||
|
|||||||
Reference in New Issue
Block a user