From: Steven Callender Date: Wed, 31 Aug 2011 18:24:49 +0000 (+0000) Subject: LP#838296 Separate the auto lost trigger. X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=refs%2Fheads%2Fcollab%2FCallender%2Fseperate_auto_lost_trigger;p=working%2FEvergreen.git LP#838296 Separate the auto lost trigger. This patch will separate the auto lost trigger so it will run on it's own schedule in cron, making use of a granularity titles 'daily-lost'. This will help prevent the triggers from failing just because of a heave load on the auto lost reactor. Signed-off-by: Steven Callender --- diff --git a/Open-ILS/examples/crontab.example b/Open-ILS/examples/crontab.example index 1cd1db3d7d..dda50a27eb 100644 --- a/Open-ILS/examples/crontab.example +++ b/Open-ILS/examples/crontab.example @@ -67,10 +67,11 @@ EG_BIN_DIR = /openils/bin # Note: push these back to 3am so they will run after the fine generator and spread out the start minute to reduce dogpiling 0 * * * * . ~/.bashrc && $EG_BIN_DIR/action_trigger_runner.pl --osrf-config $SRF_CORE --process-hooks --granularity hourly 5 3 * * * . ~/.bashrc && $EG_BIN_DIR/action_trigger_runner.pl --osrf-config $SRF_CORE --process-hooks --granularity daily -10 3 * * 1-5 . ~/.bashrc && $EG_BIN_DIR/action_trigger_runner.pl --osrf-config $SRF_CORE --process-hooks --granularity weekdays -15 3 * * 0 . ~/.bashrc && $EG_BIN_DIR/action_trigger_runner.pl --osrf-config $SRF_CORE --process-hooks --granularity weekly -20 3 1 * * . ~/.bashrc && $EG_BIN_DIR/action_trigger_runner.pl --osrf-config $SRF_CORE --process-hooks --granularity monthly -25 3 1 1 * . ~/.bashrc && $EG_BIN_DIR/action_trigger_runner.pl --osrf-config $SRF_CORE --process-hooks --granularity yearly +10 3 * * * . ~/.bashrc && $EG_BIN_DIR/action_trigger_runner.pl --osrf-config $SRF_CORE --process-hooks --granularity daily-lost +15 3 * * 1-5 . ~/.bashrc && $EG_BIN_DIR/action_trigger_runner.pl --osrf-config $SRF_CORE --process-hooks --granularity weekdays +20 3 * * 0 . ~/.bashrc && $EG_BIN_DIR/action_trigger_runner.pl --osrf-config $SRF_CORE --process-hooks --granularity weekly +25 3 1 * * . ~/.bashrc && $EG_BIN_DIR/action_trigger_runner.pl --osrf-config $SRF_CORE --process-hooks --granularity monthly +30 3 1 1 * . ~/.bashrc && $EG_BIN_DIR/action_trigger_runner.pl --osrf-config $SRF_CORE --process-hooks --granularity yearly # Legacy overdue/predue notice generator. Change to suit. #XML_FILE_PREFIX = /openils/var/data/overdue/overdue diff --git a/Open-ILS/src/sql/Pg/upgrade/xxxx.data.seperate-auto-lost-trigger.sql b/Open-ILS/src/sql/Pg/upgrade/xxxx.data.seperate-auto-lost-trigger.sql new file mode 100644 index 0000000000..eab7098b72 --- /dev/null +++ b/Open-ILS/src/sql/Pg/upgrade/xxxx.data.seperate-auto-lost-trigger.sql @@ -0,0 +1,7 @@ +BEGIN; + +INSERT INTO config.upgrade_log (version) VALUES ('xxxx'); -- Callender + +UPDATE action_trigger.event_definition set granularity='daily-lost' where reactor='MarkItemLost' and granularity='daily'; + +COMMIT;