diff --git a/data/common/common.yaml b/data/common/common.yaml --- a/data/common/common.yaml +++ b/data/common/common.yaml @@ -2054,6 +2054,7 @@ swh::deploy::webapp::reverse_proxy::backend_http_port: "%{alias('varnish::backend_http_port')}" +swh::deploy::webapp::cron::refresh_statuses: true # aliases are pulled from letsencrypt::certificates[$swh::deploy::webapp::vhost::letsencrypt_cert] swh::deploy::webapp::vhost::letsencrypt_cert: archive_production swh::deploy::webapp::vhost::ssl_protocol: "%{hiera('apache::ssl_protocol')}" diff --git a/data/hostname/webapp1.internal.softwareheritage.org.yaml b/data/hostname/webapp1.internal.softwareheritage.org.yaml --- a/data/hostname/webapp1.internal.softwareheritage.org.yaml +++ b/data/hostname/webapp1.internal.softwareheritage.org.yaml @@ -19,4 +19,6 @@ swh::deploy::webapp::metadata_search_backend: swh-search +# already running for the main instance so no need here +swh::deploy::webapp::cron::refresh_statuses: false swh::deploy::savecodenow::e2e::activate: false diff --git a/site-modules/profile/manifests/swh/deploy/webapp.pp b/site-modules/profile/manifests/swh/deploy/webapp.pp --- a/site-modules/profile/manifests/swh/deploy/webapp.pp +++ b/site-modules/profile/manifests/swh/deploy/webapp.pp @@ -212,4 +212,15 @@ 'application' => 'webapp', }, } + + $activate_once_per_environment_webapp = lookup('swh::deploy::webapp::cron::refresh_statuses') + if $activate_once_per_environment_webapp { + profile::cron::d {'refresh-savecodenow-statuses': + target => 'refresh-savecodenow-statuses', + command => 'chronic sh -c "/usr/bin/django-admin refresh_savecodenow_statuses"', + user => 'root', + minute => '*', + hour => '*', + } + } }