ソースを参照

Must use l.sort not heapify

Ask Solem 11 年 前
コミット
f25157d4ac
1 ファイル変更2 行追加2 行削除
  1. 2 2
      celery/datastructures.py

+ 2 - 2
celery/datastructures.py

@@ -12,7 +12,7 @@ import sys
 import time
 
 from collections import defaultdict, Mapping, MutableMapping, MutableSet
-from heapq import heapify, heappush, heappop
+from heapq import heappush, heappop
 from functools import partial
 from itertools import chain
 
@@ -634,7 +634,7 @@ class LimitedSet(object):
         if isinstance(other, LimitedSet):
             self._data.update(other._data)
             self._heap.extend(other._heap)
-            heapify(self._heap)
+            self._heap.sort()
         else:
             for obj in other:
                 self.add(obj)