Docker中的芹菜坏魔法数字



我可以使用终端中的命令正常运行芹菜节拍,但是当我使用Docker运行时,我会收到以下错误:

[2019-03-11 11:46:27,327: INFO/MainProcess] beat: Starting...
celery_beat_taxithe | [2019-03-11 11:46:27,489: ERROR/MainProcess] Removing corrupted schedule file 'celerybeat-schedule': error('Bad magic number',)
celery_beat_taxithe | Traceback (most recent call last):
celery_beat_taxithe |   File "/usr/local/lib/python3.6/site-packages/kombu/utils/objects.py", line 42, in __get__
celery_beat_taxithe |     return obj.__dict__[self.__name__]
celery_beat_taxithe | KeyError: 'scheduler'
celery_beat_taxithe | 
celery_beat_taxithe | During handling of the above exception, another exception occurred:
celery_beat_taxithe | 
celery_beat_taxithe | Traceback (most recent call last):
celery_beat_taxithe |   File "/usr/local/lib/python3.6/site-packages/celery/beat.py", line 476, in setup_schedule
celery_beat_taxithe |     self._store = self._open_schedule()
celery_beat_taxithe |   File "/usr/local/lib/python3.6/site-packages/celery/beat.py", line 466, in _open_schedule
celery_beat_taxithe |     return self.persistence.open(self.schedule_filename, writeback=True)
celery_beat_taxithe |   File "/usr/local/lib/python3.6/shelve.py", line 243, in open
celery_beat_taxithe |     return DbfilenameShelf(filename, flag, protocol, writeback)
celery_beat_taxithe |   File "/usr/local/lib/python3.6/shelve.py", line 227, in __init__
celery_beat_taxithe |     Shelf.__init__(self, dbm.open(filename, flag), protocol, writeback)
celery_beat_taxithe |   File "/usr/local/lib/python3.6/dbm/__init__.py", line 94, in open
celery_beat_taxithe |     return mod.open(file, flag, mode)
celery_beat_taxithe | _gdbm.error: Bad magic number

我的芹菜设置是:

CELERY_BEAT_SCHEDULE = {
    'driver_monitor_update_latlng': {
        'task': 'api.tasks.driver.turn_offline_driver',
        'schedule': 30.0 # a cada 30 seconds
    }
}

尝试从30.0删除.0。可能不是问题,但这与您的电话号码或您处理的方式有关。

相关内容

  • 没有找到相关文章

最新更新