[open-ils-commits] r15158 - in trunk/Open-ILS: examples src/support-scripts (erickson)

svn at svn.open-ils.org svn at svn.open-ils.org
Mon Dec 14 15:49:45 EST 2009


Author: erickson
Date: 2009-12-14 15:49:40 -0500 (Mon, 14 Dec 2009)
New Revision: 15158

Modified:
   trunk/Open-ILS/examples/crontab.example
   trunk/Open-ILS/src/support-scripts/action_trigger_runner.pl
Log:
removed oils_header.pl dependency from action_trigger_runner. update sample crontab to reflect

Modified: trunk/Open-ILS/examples/crontab.example
===================================================================
--- trunk/Open-ILS/examples/crontab.example	2009-12-14 20:43:02 UTC (rev 15157)
+++ trunk/Open-ILS/examples/crontab.example	2009-12-14 20:49:40 UTC (rev 15158)
@@ -54,18 +54,18 @@
 # 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

Modified: trunk/Open-ILS/src/support-scripts/action_trigger_runner.pl
===================================================================
--- trunk/Open-ILS/src/support-scripts/action_trigger_runner.pl	2009-12-14 20:43:02 UTC (rev 15157)
+++ trunk/Open-ILS/src/support-scripts/action_trigger_runner.pl	2009-12-14 20:49:40 UTC (rev 15158)
@@ -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 @@
 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 {



More information about the open-ils-commits mailing list