@@ -795,6 +795,9 @@
# Default options provided to the task server at startup.
## celeryd_opts='--time-limit=300'
+ # Switch on the integration with the Task Scheduler.
+ ## beat_enabled=False
+
###########################################################################
# Settings to configure the snippets available in the Notebook
@@ -797,6 +797,9 @@
@@ -1639,7 +1639,13 @@ TASK_SERVER = ConfigSection(
key='celeryd_opts',
default='--time-limit=300',
help=_('Default options provided to the task server at startup.')
- )
+ ),
+ BEAT_ENABLED= Config(
+ key='beat_enabled',
+ default=False,
+ type=coerce_bool,
+ help=_('Switch on the integration with the Task Scheduler.')
))
@@ -206,6 +206,10 @@ INSTALLED_APPS = [
#'django_celery_results',
]
+if desktop.conf.TASK_SERVER.BEAT_ENABLED.get():
+ INSTALLED_APPS.append('django_celery_beat')
WEBPACK_LOADER = {
'DEFAULT': {
'BUNDLE_DIR_NAME': 'desktop/js/bundles/',
@@ -270,6 +270,17 @@ debug_task.delay().get() # Works if result backend is setup and task_server is t
```
+Starting the Task Scheduler server:
+```
+./build/env/bin/celery -A core beat -l info
+or when Django Celery Beat is enabled:
+./build/env/bin/celery -A core beat -l info --scheduler django_celery_beat.schedulers:DatabaseScheduler
### Proxy