From 51fed9323fc47e5a168873060d8c38c22d27cb38 Mon Sep 17 00:00:00 2001 From: Andreas Gerstenberg Date: Fri, 18 Aug 2017 16:19:05 +0200 Subject: [PATCH] spk-spar-checker add cronjobs --- customer/spk-spar-checker/common.yaml | 1 + customer/spk-spar-checker/production.yaml | 21 +++++++++++++++++++++ customer/spk-spar-checker/test.yaml | 22 ++++++++++++++++++++++ 3 files changed, 44 insertions(+) diff --git a/customer/spk-spar-checker/common.yaml b/customer/spk-spar-checker/common.yaml index 102a1ddf..07614e39 100644 --- a/customer/spk-spar-checker/common.yaml +++ b/customer/spk-spar-checker/common.yaml @@ -3,6 +3,7 @@ infra::role: base infra::additional_classes: - infra::profile::apache_php - infra::profile::mysql_server + - infra::profile::cron accounts::users: sebastian.bator: diff --git a/customer/spk-spar-checker/production.yaml b/customer/spk-spar-checker/production.yaml index e8a0e0c9..b231c92d 100644 --- a/customer/spk-spar-checker/production.yaml +++ b/customer/spk-spar-checker/production.yaml @@ -151,3 +151,24 @@ infra::profile::apache::pp_vhosts: rewrite_rule: - '^(.*)$ https://spar-checker-de.pixelpark.net$1 [R=301,L]' +infra::profile::cron::cronjobs: + clear_tokens: + ensure: 'absent' + user: apache + command: 'echo >> $LOG; date >> $LOG; php /var/www/spar-checker/sparchecker-backend/cli.php tokens-clear >>$LOG 2>&1' + minute: '*/30' + hour: '*' + environment: + - 'APPLICATION_ENV production' + - 'LOG=/var/www/log/cron/clear.token.log' + description: clear tokens + ping_api: + ensure: 'absent' + user: apache + command: 'echo >> $LOG; date >> $LOG; php /var/www/spar-checker/sparchecker-backend/cli.php api-pinger >>$LOG 2>&1' + minute: '*/5' + hour: '*' + environment: + - 'APPLICATION_ENV production' + - 'LOG=/var/www/log/cron/ping.api.log' + description: ping api diff --git a/customer/spk-spar-checker/test.yaml b/customer/spk-spar-checker/test.yaml index 44638cca..1de3d368 100644 --- a/customer/spk-spar-checker/test.yaml +++ b/customer/spk-spar-checker/test.yaml @@ -150,3 +150,25 @@ infra::profile::apache::pp_vhosts: rewrite_rule: - '^(.*)$ https://stage-spar-checker-de.pixelpark.net$1 [R=301,L]' +infra::profile::cron::cronjobs: + clear_tokens: + ensure: 'present' + user: apache + command: 'echo >> $LOG; date >> $LOG; php /var/www/spar-checker/sparchecker-backend/cli.php tokens-clear >>$LOG 2>&1' + minute: '*/30' + hour: '*' + environment: + - 'APPLICATION_ENV production' + - 'LOG=/var/www/log/cron/clear.token.log' + description: clear tokens + ping_api: + ensure: 'present' + user: apache + command: 'echo >> $LOG; date >> $LOG; php /var/www/spar-checker/sparchecker-backend/cli.php api-pinger >>$LOG 2>&1' + minute: '*/5' + hour: '*' + environment: + - 'APPLICATION_ENV production' + - 'LOG=/var/www/log/cron/ping.api.log' + description: ping api + -- 2.39.5