Browse Source

Merge branch '3.1' of github.com:celery/celery into 3.1

Ask Solem 9 năm trước cách đây
mục cha
commit
188d0c2890
1 tập tin đã thay đổi với 6 bổ sung0 xóa
  1. 6 0
      celery/beat.py

+ 6 - 0
celery/beat.py

@@ -374,6 +374,12 @@ class PersistentScheduler(Scheduler):
     def setup_schedule(self):
         try:
             self._store = self._open_schedule()
+            # In some cases there may be different errors from a storage
+            # backend for corrupted files. Example - DBPageNotFoundError
+            # exception from bsddb. In such case the file will be
+            # successfully opened but the error will be raised on first key
+            # retrieving.
+            self._store.keys()
         except Exception as exc:
             self._store = self._destroy_open_corrupted_schedule(exc)