diff options
Diffstat (limited to 'conf')
-rw-r--r-- | conf/crontab.ugly | 51 | ||||
-rw-r--r-- | conf/general.yml-example | 8 |
2 files changed, 47 insertions, 12 deletions
diff --git a/conf/crontab.ugly b/conf/crontab.ugly index d9d146c93..4eb6d5a26 100644 --- a/conf/crontab.ugly +++ b/conf/crontab.ugly @@ -13,33 +13,58 @@ MAILTO=cron-!!(*= $site *)!!@mysociety.org MAILTO=!!(*= $user *)!!@mysociety.org !!(* } *)!! -# On only one server -!!(* if ($vhost eq 'reportemptyhomes.com') { *)!! +!!(* -*/5 * * * * !!(*= $user *)!! run-with-lockfile -n /data/vhost/!!(*= $vhost *)!!/send-reports.lock "/data/vhost/!!(*= $vhost *)!!/fixmystreet/bin/cron-wrapper send-reports --verbose" || echo "stalled?" -#2 * * * * !!(*= $user *)!! run-with-lockfile -n /data/vhost/!!(*= $vhost *)!!/send-alerts.lock "/data/vhost/!!(*= $vhost *)!!/fixmystreet/bin/cron-wrapper send-alerts" || echo "stalled?" -0,30 * * * * !!(*= $user *)!! run-with-lockfile -n /data/vhost/!!(*= $vhost *)!!/send-questionnaires.lock "/data/vhost/!!(*= $vhost *)!!/fixmystreet/bin/cron-wrapper send-questionnaires" || echo "stalled?" +my @sending = qw( + www.fixmystreet.com + bromley.test.mysociety.org + stevenage.test.mysociety.org + barnet.fixmystreet.staging.mysociety.org + oxfordshire.fixmystreet.staging.mysociety.org + fixmybarangay.test.mysociety.org + demo.fixmybarangay.com + www.fixmybarangay.com + zurich.fixmystreet.staging.mysociety.org + seesomething.mysociety.org +); +my @no_alerts = qw( + zurich.fixmystreet.staging.mysociety.org + seesomething.mysociety.org +); +my @no_open311 = qw( + zurich.fixmystreet.staging.mysociety.org + seesomething.mysociety.org +); +my %sending = map { $_ => 1 } @sending; +my %no_alerts = map { $_ => 1 } @no_alerts; + +*)!! -!!(* } elsif (($vhost eq 'www.fixmystreet.com') || ($vhost eq 'bromley.test.mysociety.org') || ($vhost eq 'barnet.fixmystreet.staging.mysociety.org') || ($vhost eq 'oxfordshire.fixmystreet.staging.mysociety.org') || ($vhost eq 'demo.fixmybarangay.com') || ($vhost eq 'www.fixmybarangay.com') || ($vhost eq 'stevenage.test.mysociety.org')) { *)!! +!!(* if ($sending{$vhost}) { *)!! +# Sending of reports 5,10,15,20,25,30,35,40,45,50,55 * * * * !!(*= $user *)!! run-with-lockfile -n /data/vhost/!!(*= $vhost *)!!/send-reports.lock "/data/vhost/!!(*= $vhost *)!!/fixmystreet/bin/cron-wrapper send-reports" || echo "stalled?" 0 0-7,9-11,13-15,17-23 * * * !!(*= $user *)!! run-with-lockfile -n /data/vhost/!!(*= $vhost *)!!/send-reports.lock "/data/vhost/!!(*= $vhost *)!!/fixmystreet/bin/cron-wrapper send-reports" || echo "stalled?" 0 8,12,16 * * * !!(*= $user *)!! run-with-lockfile -n /data/vhost/!!(*= $vhost *)!!/send-reports.lock "/data/vhost/!!(*= $vhost *)!!/fixmystreet/bin/cron-wrapper send-reports --verbose" || echo "stalled?" + +!!(* if (!$no_alerts{$vhost}) { *)!! +# Sending of alerts and questionnaires 2 * * * * !!(*= $user *)!! run-with-lockfile -n /data/vhost/!!(*= $vhost *)!!/send-alerts.lock "/data/vhost/!!(*= $vhost *)!!/fixmystreet/bin/cron-wrapper send-alerts" || echo "stalled?" 0,30 * * * * !!(*= $user *)!! run-with-lockfile -n /data/vhost/!!(*= $vhost *)!!/send-questionnaires.lock "/data/vhost/!!(*= $vhost *)!!/fixmystreet/bin/cron-wrapper send-questionnaires" || echo "stalled?" -5,10,15,20,25,30,35,40,45,50,55 * * * * !!(*= $user *)!! run-with-lockfile -n /data/vhost/!!(*= $vhost *)!!/send-comments.lock "/data/vhost/!!(*= $vhost *)!!/fixmystreet/bin/cron-wrapper send-comments" || echo "stalled?" +!!(* } *)!! +!!(* if (!$no_open311{$vhost}) { *)!! +# Open311 sending and fetching of updates +5,10,15,20,25,30,35,40,45,50,55 * * * * !!(*= $user *)!! run-with-lockfile -n /data/vhost/!!(*= $vhost *)!!/send-comments.lock "/data/vhost/!!(*= $vhost *)!!/fixmystreet/bin/cron-wrapper send-comments" || echo "stalled?" 5,10,15,20,25,30,35,40,45,50,55 * * * * !!(*= $user *)!! run-with-lockfile -n /data/vhost/!!(*= $vhost *)!!/fetch-comments.lock "/data/vhost/!!(*= $vhost *)!!/fixmystreet/bin/cron-wrapper fetch-comments" || echo "stalled?" 0 8 * * * !!(*= $user *)!! run-with-lockfile -n /data/vhost/!!(*= $vhost *)!!/fetch-comments.lock "/data/vhost/!!(*= $vhost *)!!/fixmystreet/bin/cron-wrapper fetch-comments --verbose" || echo "stalled?" 0 1 * * * !!(*= $user *)!! run-with-lockfile -n /data/vhost/!!(*= $vhost *)!!/fetch-comments.lock "/data/vhost/!!(*= $vhost *)!!/fixmystreet/bin/cron-wrapper fetch-comments-24hs" || echo "stalled?" +# Open311 service list population 30 * * * * !!(*= $user *)!! run-with-lockfile -n /data/vhost/!!(*= $vhost *)!!/open311-populate-service-list.lock "/data/vhost/!!(*= $vhost *)!!/fixmystreet/bin/cron-wrapper open311-populate-service-list" || echo "stalled?" 0 0-7,9-23 * * * !!(*= $user *)!! run-with-lockfile -n /data/vhost/!!(*= $vhost *)!!/open311-populate-service-list.lock "/data/vhost/!!(*= $vhost *)!!/fixmystreet/bin/cron-wrapper open311-populate-service-list" || echo "stalled?" 0 8 * * * !!(*= $user *)!! run-with-lockfile -n /data/vhost/!!(*= $vhost *)!!/open311-populate-service-list.lock "/data/vhost/!!(*= $vhost *)!!/fixmystreet/bin/cron-wrapper open311-populate-service-list --warn" || echo "stalled?" +!!(* } *)!! -!!(* } elsif ($vhost eq 'seesomething.mysociety.org') { *)!! -5,10,15,20,25,30,35,40,45,50,55 * * * * !!(*= $user *)!! run-with-lockfile -n /data/vhost/!!(*= $vhost *)!!/send-reports.lock "/data/vhost/!!(*= $vhost *)!!/fixmystreet/bin/cron-wrapper send-reports" || echo "stalled?" -0 0-7,9-11,13-15,17-23 * * * !!(*= $user *)!! run-with-lockfile -n /data/vhost/!!(*= $vhost *)!!/send-reports.lock "/data/vhost/!!(*= $vhost *)!!/fixmystreet/bin/cron-wrapper send-reports" || echo "stalled?" -0 8,12,16 * * * !!(*= $user *)!! run-with-lockfile -n /data/vhost/!!(*= $vhost *)!!/send-reports.lock "/data/vhost/!!(*= $vhost *)!!/fixmystreet/bin/cron-wrapper send-reports --verbose" || echo "stalled?" !!(* } *)!! # Once an hour, update the all reports stats @@ -49,3 +74,7 @@ MAILTO=!!(*= $user *)!!@mysociety.org 39 2 * * * !!(*= $user *)!! /data/vhost/!!(*= $vhost *)!!/fixmystreet/bin/problems-filed-graph 43 2 * * * !!(*= $user *)!! /data/vhost/!!(*= $vhost *)!!/fixmystreet/bin/problem-creation-graph 00 8 * * * !!(*= $user *)!! /data/vhost/!!(*= $vhost *)!!/fixmystreet/bin/check-for-zombies !!(*= $user *)!! + +!!(* if ($vhost =~ /zurich/) { *)!! +30 0 * * * !!(*= $user *)!! /data/vhost/!!(*= $vhost *)!!/fixmystreet/bin/cron-wrapper zurich-overdue-alert +!!(* } *)!! diff --git a/conf/general.yml-example b/conf/general.yml-example index a8da589d1..4a06a2aff 100644 --- a/conf/general.yml-example +++ b/conf/general.yml-example @@ -27,8 +27,14 @@ CONTACT_NAME: 'FixMyStreet' # special address. DO_NOT_REPLY_EMAIL: 'do-not-reply@example.org' -# Whether this is a development site or not. +# Whether this is a development site or not. It will mean e.g. templates/ +# CSS modified times aren't cached STAGING_SITE: 1 +# Normally, a staging site will route all reports to CONTACT_EMAIL on a +# development site (when STAGING_SITE is 1), to guard against sending fake +# reports to live places. Set this to 1 if you want a dev site to route +# reports as normal. +SEND_REPORTS_ON_STAGING: 0 # What to use as front page/alert example places placeholder # Defaults to High Street, Main Street |