Browse Source

Made sure a time zone is provided for request expiration checking

Albert Wang 10 years ago
parent
commit
4c9e884e7f
1 changed files with 1 additions and 1 deletions
  1. 1 1
      celery/worker/request.py

+ 1 - 1
celery/worker/request.py

@@ -220,7 +220,7 @@ class Request(object):
     def maybe_expire(self):
         """If expired, mark the task as revoked."""
         if self.expires:
-            now = datetime.now(tz_or_local(self.tzlocal) if self.utc else None)
+            now = datetime.now(self.expires.tzinfo)
             if now > self.expires:
                 revoked_tasks.add(self.id)
                 return True