From: erickson Date: Mon, 2 Nov 2009 01:48:16 +0000 (+0000) Subject: added explicit --process-hooks flag to turn on hook event creation. This allows... X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=eb14062987c882945db04b5182956521be6f676b;p=contrib%2FConifer.git added explicit --process-hooks flag to turn on hook event creation. This allows the script to run in --run-pending mode without trying to create hook events from default values git-svn-id: svn://svn.open-ils.org/ILS/trunk@14707 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- diff --git a/Open-ILS/src/support-scripts/action_trigger_runner.pl b/Open-ILS/src/support-scripts/action_trigger_runner.pl index 3b14c31df4..87c437780f 100755 --- a/Open-ILS/src/support-scripts/action_trigger_runner.pl +++ b/Open-ILS/src/support-scripts/action_trigger_runner.pl @@ -28,11 +28,13 @@ my $opt_run_pending = 0; my $opt_debug_stdout = 0; my $opt_help = 0; my $opt_hooks; +my $opt_process_hooks = 0; GetOptions( 'osrf-config=s' => \$opt_osrf_config, 'run-pending' => \$opt_run_pending, 'hooks=s' => \$opt_hooks, + 'process-hooks' => \$opt_process_hooks, 'debug-stdout' => \$opt_debug_stdout, 'custom-filters=s' => \$opt_custom_filter, 'lock-file=s' => \$opt_lockfile, @@ -77,11 +79,14 @@ $0 : Create and process action/trigger events /openils/conf/action_trigger_filters.json --run-pending - Run pending action_trigger.event's + Run pending events + + --process-hooks + Create hook events --hooks=hook1[,hook2,hook3,...] - Hooks for which events should be generated. Defaults to the list of - hooks defined in the --custom-filters option. + Define which hooks to create events for. If none are defined, + it defaults to the list of hooks defined in the --custom-filters option. --debug-stdout Print server responses to stdout (as JSON) for debugging @@ -107,6 +112,7 @@ HELP # create events for the specified hooks using the configured filters and context orgs sub process_hooks { + return unless $opt_process_hooks; my @hooks = ($opt_hooks) ? split(',', $opt_hooks) : keys(%$hook_handlers); my $ses = OpenSRF::AppSession->create('open-ils.trigger');