首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >docker中的芹菜坏魔数

docker中的芹菜坏魔数
EN

Stack Overflow用户
提问于 2019-03-11 22:55:56
回答 1查看 206关注 0票数 0

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

代码语言:javascript
复制
[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

我对芹菜的设置是:

代码语言:javascript
复制
CELERY_BEAT_SCHEDULE = {
    'driver_monitor_update_latlng': {
        'task': 'api.tasks.driver.turn_offline_driver',
        'schedule': 30.0 # a cada 30 seconds
    }
}
EN

回答 1

Stack Overflow用户

发布于 2019-03-11 22:58:47

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

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/55104658

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档