[Update] 修改 task 运行机制

This commit is contained in:
ibuler
2017-12-22 21:42:12 +08:00
parent 4893c4664d
commit 30efec1b09
12 changed files with 253 additions and 183 deletions

View File

@@ -13,10 +13,5 @@ app = Celery('jumpserver')
# Using a string here means the worker will not have to
# pickle the object when using Windows.
app.config_from_object('django.conf:settings')
app.config_from_object('django.conf:settings', namespace='CELERY')
app.autodiscover_tasks(lambda: [app_config.split('.')[0] for app_config in settings.INSTALLED_APPS])
app.conf.update(
CELERYBEAT_SCHEDULE={
}
)