From 9bf34ddd7a0465530219adce909fce01a5228769 Mon Sep 17 00:00:00 2001 From: erickson Date: Mon, 14 Dec 2009 20:49:40 +0000 Subject: [PATCH] removed oils_header.pl dependency from action_trigger_runner. update sample crontab to reflect git-svn-id: svn://svn.open-ils.org/ILS/trunk@15158 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/examples/crontab.example | 14 +++++++------- Open-ILS/src/support-scripts/action_trigger_runner.pl | 6 ++++-- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/Open-ILS/examples/crontab.example b/Open-ILS/examples/crontab.example index cbe8ad94f6..ea1386a16c 100644 --- a/Open-ILS/examples/crontab.example +++ b/Open-ILS/examples/crontab.example @@ -54,18 +54,18 @@ EG_BIN_DIR = /openils/bin # Action/Trigger entries ---- # Runs all pending A/T events every half hour -0 */2 * * * . ~/.bashrc && cd $EG_BIN_DIR && ./action_trigger_runner.pl --osrf-config $SRF_CORE --run-pending +0 */2 * * * . ~/.bashrc && $EG_BIN_DIR/action_trigger_runner.pl --osrf-config $SRF_CORE --run-pending # Passive A/T event generation. # Note: the --granularity flag is not supported in 1.6 # Note: passive event defs with no granularity will be processed regardless of any granularity flags # 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 && cd $EG_BIN_DIR && ./action_trigger_runner.pl --osrf-config $SRF_CORE --process-hooks --granularity hourly -5 3 * * * . ~/.bashrc && cd $EG_BIN_DIR && ./action_trigger_runner.pl --osrf-config $SRF_CORE --process-hooks --granularity daily -10 3 * * 1-5 . ~/.bashrc && cd $EG_BIN_DIR && ./action_trigger_runner.pl --osrf-config $SRF_CORE --process-hooks --granularity weekdays -15 3 * * 0 . ~/.bashrc && cd $EG_BIN_DIR && ./action_trigger_runner.pl --osrf-config $SRF_CORE --process-hooks --granularity weekly -20 3 1 * * . ~/.bashrc && cd $EG_BIN_DIR && ./action_trigger_runner.pl --osrf-config $SRF_CORE --process-hooks --granularity monthly -25 3 1 1 * . ~/.bashrc && cd $EG_BIN_DIR && ./action_trigger_runner.pl --osrf-config $SRF_CORE --process-hooks --granularity yearly +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 # Legacy overdue/predue notice generator. Change to suit. #XML_FILE_PREFIX = /openils/var/data/overdue/overdue diff --git a/Open-ILS/src/support-scripts/action_trigger_runner.pl b/Open-ILS/src/support-scripts/action_trigger_runner.pl index 1e502bb134..757b1a50dc 100755 --- a/Open-ILS/src/support-scripts/action_trigger_runner.pl +++ b/Open-ILS/src/support-scripts/action_trigger_runner.pl @@ -16,10 +16,11 @@ use strict; use warnings; use Getopt::Long; +use OpenSRF::System; use OpenSRF::AppSession; use OpenSRF::Utils::JSON; use OpenSRF::EX qw(:try); -require 'oils_header.pl'; +use OpenILS::Utils::Fieldmapper; my $opt_lockfile = '/tmp/action-trigger-LOCK'; my $opt_osrf_config = '/openils/conf/opensrf_core.xml'; @@ -167,7 +168,8 @@ print F $$; close F; try { - osrf_connect($opt_osrf_config); + OpenSRF::System->bootstrap_client(config_file => $opt_osrf_config); + Fieldmapper->import(IDL => OpenSRF::Utils::SettingsClient->new->config_value("IDL")); process_hooks(); run_pending(); } otherwise { -- 2.11.0