Skip to content

Commit 22fc2bb

Browse files
committed
sort the queues only by name
1 parent d861f36 commit 22fc2bb

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

django_rq/settings.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
from operator import itemgetter
2+
13
from django.conf import settings
24
from django.core.exceptions import ImproperlyConfigured
35

@@ -13,7 +15,7 @@
1315

1416
# All queues in list format so we can get them by index, includes failed queues
1517
QUEUES_LIST = []
16-
for key, value in sorted(QUEUES.items()):
18+
for key, value in sorted(QUEUES.items(), key=itemgetter(0)):
1719
QUEUES_LIST.append({'name': key, 'connection_config': value})
1820
for config in get_unique_connection_configs():
1921
QUEUES_LIST.append({'name': 'failed', 'connection_config': config})

0 commit comments

Comments
 (0)