动态即通过前端 UI 等手段自定义周期时间,而不是通过初始化时写配置文件,经过 gg 和实践摸索,发现并不能实现动态添加周期任务。
https://stackoverflow.com/questions/10194975/how-to-dynamically-add-remove-periodic-tasks-to-celery-celerybeat/43752416
倒数第 3 个回答,提到了文档中的使用 https://docs.celeryproject.org/en/latest/userguide/periodic-tasks.html#entries
然后我使用文档中的例子 add_periodic_task,并没有成功,文档中说的不是动态添加?
https://stackoverflow.com/questions/10194975/how-to-dynamically-add-remove-periodic-tasks-to-celery-celerybeat/43752416
倒数第 3 个回答,提到了文档中的使用 https://docs.celeryproject.org/en/latest/userguide/periodic-tasks.html#entries
然后我使用文档中的例子 add_periodic_task,并没有成功,文档中说的不是动态添加?