Example cron action_trigger_runner.pl granularity issues
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Evergreen |
New
|
Undecided
|
Unassigned |
Bug Description
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. These issues add a few barriers to new users/testers that don't know that the example config won't work.
http://
The current example has the following structure. (with extra stuff cleared out)
# Runs all pending A/T events every half hour
*/30 * * * * . ~/.bashrc && $EG_BIN_
# 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_
5 3 * * * . ~/.bashrc && $EG_BIN_
10 3 * * 1-5 . ~/.bashrc && $EG_BIN_
15 3 * * 0 . ~/.bashrc && $EG_BIN_
20 3 1 * * . ~/.bashrc && $EG_BIN_
25 3 1 1 * . ~/.bashrc && $EG_BIN_
So there are a bunch of runs for the various different granularity settings that just process hooks and generate pending events.. and one --run-pending run every half an hour to process all the pending events.
But the query that the --run-pending event uses to fire pending events looks for granularity:null. So it won't run pending events that have a granularity set.
[2015-06-23 13:55:52] open-ils.trigger [INFO:20849:
Also, there is no action_
I've been fixing these issues by adding a --run-pending argument to each of the Passive A/T event generation lines, so the events are run right after they are processed. I'm wondering if there is a drawback to this method though. I assume there was a good reason to setup the example like it is, with only one run-pending every half an hour to handle all of the pending events at once.
Also, should a granularity be required for passive event definitions to be processed? Or should there be another crontab entry to process those ever xx minutes? I'll create a branch with changes that work for me.
Josh
tags: | added: actiontrigger |
Also, I think that the "~/.bashrc &&" can be removed also from the start of each action trigger line, since in my default debian .bashrc , the first thing it does is check to see if it is being run interactively, and exit if it is not.
# ~/.bashrc: executed by bash(1) for non-login shells. doc/bash/ examples/ startup- files (in the package bash-doc)
# see /usr/share/
# for examples
# If not running interactively, don't do anything
case $- in
*i*) ;;
*) return;;
esac
Josh