]> Frank Brehm's Git Trees - pixelpark/hiera.git/commitdiff
spk-spar-checker add cronjobs
authorAndreas Gerstenberg <gerstenberg@pixelpark.com>
Fri, 18 Aug 2017 14:19:05 +0000 (16:19 +0200)
committerAndreas Gerstenberg <gerstenberg@pixelpark.com>
Fri, 18 Aug 2017 14:19:05 +0000 (16:19 +0200)
customer/spk-spar-checker/common.yaml
customer/spk-spar-checker/production.yaml
customer/spk-spar-checker/test.yaml

index 102a1ddf294e39bf12a02562173423dbc5c73853..07614e39d25ce4e8b152f5490decaa6c295bdbb8 100644 (file)
@@ -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:
index e8a0e0c9826683c631cc132757bb5d047adcf2ae..b231c92d5165810693fdce34743b3546ba06d4a3 100644 (file)
@@ -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
index 44638cca7f0998d0c55edbcac2d2e82b76e0b57b..1de3d3680fe71b0456848b8c961198cc30548ae7 100644 (file)
@@ -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
+