diff --git a/service/webodm-celery.service b/service/webodm-celery.service new file mode 100644 index 00000000..fbd082b0 --- /dev/null +++ b/service/webodm-celery.service @@ -0,0 +1,16 @@ +[Unit] +Description=Start WebODM Celery Service Container +Requires=webodm-nginx.service + +[Service] +Type=simple +User=odm +Group=odm +PIDFile=/run/webodm-celery.pid +WorkingDirectory=/webodm +ExecStart=/webodm/python3-venv/bin/celery -A worker worker --autoscale 8,2 --max-tasks-per-child 1000 --loglevel=warn +ExecStop=/bin/kill -s QUIT $MAINPID +Restart=on-failure + +[Install] +WantedBy=multi-user.target diff --git a/service/webodm-celerybeat.service b/service/webodm-celerybeat.service new file mode 100644 index 00000000..c42091d1 --- /dev/null +++ b/service/webodm-celerybeat.service @@ -0,0 +1,16 @@ +[Unit] +Description=Start WebODM Celery Scheduler Service Container +Requires=webodm-nginx.service + +[Service] +Type=simple +User=odm +Group=odm +PIDFile=/run/webodm-celerybeat.pid +WorkingDirectory=/webodm +ExecStart=/webodm/python3-venv/bin/celery -A worker beat +ExecStop=/bin/kill -s QUIT $MAINPID +Restart=on-failure + +[Install] +WantedBy=multi-user.target