瀏覽代碼

Tests passing

Ask Solem 12 年之前
父節點
當前提交
0eb5a8fd20
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      celery/utils/timer2.py

+ 2 - 2
celery/utils/timer2.py

@@ -46,14 +46,14 @@ class Entry(object):
             'fun', 'args', 'kwargs', 'tref', 'cancelled',
             '_last_run', '__weakref__',
         )
-    _last_run = None
-    cancelled = False
 
     def __init__(self, fun, args=None, kwargs=None):
         self.fun = fun
         self.args = args or []
         self.kwargs = kwargs or {}
         self.tref = weakrefproxy(self)
+        self._last_run = None
+        self.cancelled = False
 
     def __call__(self):
         return self.fun(*self.args, **self.kwargs)