From d445150a1adb9b696dbf3531eca9d31d65224d5f Mon Sep 17 00:00:00 2001 From: Remington Steed Date: Wed, 26 Nov 2014 09:21:52 -0500 Subject: [PATCH] LP#1396161: Improve public docs and change osrf-config default from script help The public docs have an "Action Triggers" chapter, so this commit applies the same improvements there to match the help docs in the script. Also in the public docs, in two places a filename was split across lines, causing a gap to appear in the HTML version of the docs. That is corrected here. This commit also removes the 'osrf-config' option from the examples in the script help docs, since they are using the default value. Signed-off-by: Remington Steed Signed-off-by: Ben Shum --- .../action_trigger_runner.pl.in | 6 +-- docs/admin/actiontriggers.txt | 38 ++++++++++++++++--- 2 files changed, 36 insertions(+), 8 deletions(-) diff --git a/Open-ILS/src/support-scripts/action_trigger_runner.pl.in b/Open-ILS/src/support-scripts/action_trigger_runner.pl.in index 8f23780628..1c217bc3c2 100755 --- a/Open-ILS/src/support-scripts/action_trigger_runner.pl.in +++ b/Open-ILS/src/support-scripts/action_trigger_runner.pl.in @@ -135,14 +135,14 @@ $0 : Create and process action/trigger events # To run all pending events that have no granularity set. This is what # you tell CRON to run at regular intervals - perl $0 --osrf-config @sysconfdir@/opensrf_core.xml --run-pending + perl $0 --run-pending # To batch create all "checkout.due" events - perl $0 --osrf-config @sysconfdir@/opensrf_core.xml --hooks=checkout.due --process-hooks + perl $0 --hooks=checkout.due --process-hooks # To batch create all events for a specific granularity and to send notices for all pending # events with that same granularity. - perl $0 --osrf-config @sysconfdir@/opensrf_core.xml --run-pending --granularity=Hourly --process-hooks + perl $0 --run-pending --granularity=Hourly --process-hooks HELP } diff --git a/docs/admin/actiontriggers.txt b/docs/admin/actiontriggers.txt index 2d055a6271..7d125e771e 100644 --- a/docs/admin/actiontriggers.txt +++ b/docs/admin/actiontriggers.txt @@ -192,26 +192,54 @@ To run the action triggers, an Evergreen administrator will need to run the trig You have several options when running the script: -* --run-pending: Run the pending events +* --run-pending: Run pending events to send emails or take other actions as +specified by the reactor in the event definition. * --process-hooks: Create hook events -* --osrf-config=[config_file]: OpenSRF core config file. Defaults to: /openils/conf/ -opensrf_core.xml. +* --osrf-config=[config_file]: OpenSRF core config file. Defaults to: +/openils/conf/opensrf_core.xml * --custom-filters=[filter_file]: File containing a JSON Object which describes any hooks -that should use a user-defined filter to find their target objects. Defaults to: /openils/conf/ -action_trigger_filters.json +that should use a user-defined filter to find their target objects. Defaults to: +/openils/conf/action_trigger_filters.json * --max-sleep=[seconds]: When in process-hooks mode, wait up to [seconds] for the lock file to go away. Defaults to 3600 (1 hour). * --hooks=hook1[,hook2,hook3,...]: Define which hooks to create events for. If none are defined, it defaults to the list of hooks defined in the --custom-filters option. +Requires --process-hooks. + +* --granularity=[label]: Limit creating events and running pending events to +those only with [label] granularity setting. * --debug-stdout: Print server responses to STDOUT (as JSON) for debugging. * --lock-file=[file_name]: Sets the lock file for the process. +* --verbose: Show details of script processing. + * --help: Show help information. +Examples: + +* Run all pending events that have no granularity set. This is what you tell +CRON to run at regular intervals. ++ +---- +perl action_trigger_runner.pl --run-pending +---- + +* Batch create all "checkout.due" events ++ +---- +perl action_trigger_runner.pl --hooks=checkout.due --process-hooks +---- + +* Batch create all events for a specific granularity and to send notices for all +pending events with that same granularity. ++ +---- +perl action_trigger_runner.pl --run-pending --granularity=Hourly --process-hooks +---- -- 2.43.2