[OPEN-ILS-GENERAL] Processing hooks for action triggers in Evergreen 3.2 and crontab configuration

Linda Jansova skolkova at chello.cz
Mon May 4 03:16:54 EDT 2020


Thank you very much, Jason!

Linda

On 5/4/20 3:38 AM, Jason Stephenson wrote:
> Linda,
>
> The short answer is yes. You need the --process-hooks and --run-pending
> for events with no granularity to work.
>
> Josh is correct about the current example crontab does not work for
> these events.
>
> That said, I think there is an expectation that passive events will have
> a granularity, though I do not believe that this is documented anywhere.
>
> Hope that helps,
> Jason
>
> On 5/3/20 1:23 PM, Linda Jansova wrote:
>> Hi,
>>
>> We are trying to set up additional action triggers (and make some of the
>> default ones work) that send emails in Evergreen 3.2. However, it seems
>> that while some triggers work okay, some do not without a clear pattern.
>>
>> We currently use the default crontab configuration:
>>
>> # Action/Trigger entries ----
>>
>> # Runs all pending A/T events every half hour
>> */5 * * * * . ~/.bashrc && $EG_BIN_DIR/action_trigger_runner.pl
>> --osrf-config $SRF_CORE --run-pending
>>
>> # Passive A/T event generation.
>> # 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
>>
>> # Purge old A/T events
>> 15 1  * * *   . ~/.bashrc && $EG_BIN_DIR/purge_at_events.srfsh
>>
>> This means that triggers without any granularity value are processed using:
>>
>> action_trigger_runner.pl –run-pending
>>
>> without the --process-hooks parameter.
>>
>> The documentation
>> (http://docs.evergreen-ils.org/reorg/3.2/command_line_admin/_processing_action_triggers.html)
>> mentions both
>>
>> perl action_trigger_runner.pl --run-pending
>>
>> and
>>
>> /openils/bin/action_trigger_runner.pl --process-hooks --run-pending
>>
>> Is it a good idea to add the --process-hooks to the default crontab
>> configuration as Josh suggested some time ago in the following Launchpad
>> bug:
>>
>> „Hello, I think that the current example crontab file included with
>> evergreen is incorrect when it comes to running pending action trigger
>> events, and it doesn't try to process hooks for events without a
>> granularity set at all.“ (https://bugs.launchpad.net/evergreen/+bug/1468096)
>>
>> ?
>>
>> The thing is that we have our test environment set up in such a way that
>> it does not send any emails to users and it is a bit of a challenge to
>> figure out what might be wrong with the particular action triggers
>> without actually seeing the emails sent.
>>
>> Thank you in advance for sharing your views on this!
>>
>> Linda
>>


More information about the Open-ils-general mailing list