From: Andreas Gerstenberg Date: Fri, 18 Aug 2017 14:19:05 +0000 (+0200) Subject: spk-spar-checker add cronjobs X-Git-Tag: v0.1.0~2575 X-Git-Url: https://git.uhu-banane.de/?a=commitdiff_plain;h=51fed9323fc47e5a168873060d8c38c22d27cb38;p=pixelpark%2Fhiera.git spk-spar-checker add cronjobs --- 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 +