소스 검색

celery command: extensions should be sorted by name

Ask Solem 12 년 전
부모
커밋
bb1c92e667
1개의 변경된 파일3개의 추가작업 그리고 2개의 파일을 삭제
  1. 3 2
      celery/bin/celery.py

+ 3 - 2
celery/bin/celery.py

@@ -9,8 +9,9 @@ The :program:`celery` umbrella command.
 from __future__ import absolute_import, print_function
 
 import anyjson
-import warnings
+import heapq
 import sys
+import warnings
 
 from future_builtins import map
 
@@ -90,7 +91,7 @@ def load_extension_commands(namespace='celery.commands'):
             warnings.warn(
                 'Cannot load extension {0!r}: {1!r}'.format(sym, exc))
         else:
-            _get_extension_classes().append(ep.name)
+            heapq.heappush(_get_extension_classes(), ep.name)
             command(cls, name=ep.name)