diff --git a/site-modules/profile/templates/swh/deploy/worker/parameters.conf.erb b/site-modules/profile/templates/swh/deploy/worker/parameters.conf.erb index 1b45d870..888761dc 100644 --- a/site-modules/profile/templates/swh/deploy/worker/parameters.conf.erb +++ b/site-modules/profile/templates/swh/deploy/worker/parameters.conf.erb @@ -1,25 +1,25 @@ # Managed by puppet - modifications will be overwritten # In defined class profile::swh::deploy::worker::instance [Service] Environment=CONCURRENCY=<%= @concurrency %> Environment=MAX_TASKS_PER_CHILD=<%= @max_tasks_per_child %> Environment=LOGLEVEL=<%= @loglevel %> <%- if !@sentry_dsn.nil? and !@sentry_dsn.empty? -%> Environment=SWH_SENTRY_DSN=<%= @sentry_dsn %> <%- end -%> <%- if !@sentry_environment.nil? and !@sentry_environment.empty? -%> Environment=SWH_SENTRY_ENVIRONMENT=<%= @sentry_environment %> <%- end -%> <%- if !@sentry_swh_package.nil? and !@sentry_swh_package.empty? -%> Environment=SWH_MAIN_PACKAGE=<%= @sentry_swh_package %> <%- end -%> <% if @limit_no_file %> LimitNOFILE=<%= @limit_no_file %> <% end %> <% if @private_tmp %> PrivateTmp=<%= @private_tmp %> <% end %> <%- if !@celery_worker_extra_args.nil? and !@celery_worker_extra_args.empty? -%> -Environment=CELERY_WORKER_EXTRA_ARGS=<%= @celery_worker_extra_args %> +Environment=SWH_WORKER_CLI_EXTRA_ARGS=<%= @celery_worker_extra_args %> <%- end -%> diff --git a/site-modules/profile/templates/swh/deploy/worker/swh-worker@.service.erb b/site-modules/profile/templates/swh/deploy/worker/swh-worker@.service.erb index 66c7b9bf..4e045c04 100644 --- a/site-modules/profile/templates/swh/deploy/worker/swh-worker@.service.erb +++ b/site-modules/profile/templates/swh/deploy/worker/swh-worker@.service.erb @@ -1,34 +1,34 @@ # Managed by puppet - modifications will be overwritten # In defined class profile::swh::deploy::worker::base [Unit] Description=Software Heritage Worker (%i) After=network.target [Service] User=swhworker Group=swhworker Type=simple # Following environment variables can be overriden in the respective # swh-worker@.service.d/parameters.conf Environment=SWH_CONFIG_FILENAME=/etc/softwareheritage/%i.yml Environment=SWH_LOG_TARGET=journal Environment=CONCURRENCY=10 Environment=MAX_TASKS_PER_CHILD=5 Environment=LOGLEVEL=info Environment=CELERY_HOSTNAME=<%= @celery_hostname %> -Environment=CELERY_WORKER_EXTRA_ARGS= -ExecStart=/usr/bin/python3 -m celery worker -n %i@${CELERY_HOSTNAME} --app=swh.scheduler.celery_backend.config.app --pool=prefork ${CELERY_WORKER_EXTRA_ARGS} --concurrency=${CONCURRENCY} --maxtasksperchild=${MAX_TASKS_PER_CHILD} -Ofair --loglevel=${LOGLEVEL} --without-gossip --without-mingle --without-heartbeat +Environment=SWH_WORKER_CLI_EXTRA_ARGS="--" +ExecStart=/usr/bin/python3 -m celery worker -n %i@${CELERY_HOSTNAME} --app=swh.scheduler.celery_backend.config.app --pool=prefork --concurrency=${CONCURRENCY} --maxtasksperchild=${MAX_TASKS_PER_CHILD} -Ofair --loglevel=${LOGLEVEL} --without-gossip --without-mingle --without-heartbeat ${SWH_WORKER_CLI_EXTRA_ARGS} KillMode=process KillSignal=SIGTERM TimeoutStopSec=15m OOMPolicy=kill Restart=always RestartSec=10 [Install] WantedBy=multi-user.target