[Evergreen-general] Triggers for au.created and au.expired hooks?
Linda Jansová
linda.jansova at gmail.com
Mon Jul 11 16:16:55 EDT 2022
Dear Steve,
Thank you for highlighting this!
We have just checked it and our file seems to contain the same lines
like the ones you have shared (although this Evergreen installation
dates back to 2011 when we started running a 2.0.7 version :-).
Linda
On 7/11/22 21:57, Steve Callender wrote:
> Here's a small thing you can check. I see this causing issues quite a
> lot for these particular hooks, make sure you have,
>
> "au.expired" : {
> "context_org":"home_ou",
> "filter" :
> { "active":"t",
> "deleted":"f" }
> },
>
> "au.created" : {
> "context_org":"home_ou",
> "filter": {
> "active":"t",
> "deleted":"f"
> }
> },
>
> In your action_trigger_filters.json file. I've seen folks have an
> older version of this file and not updated to teach the triggers the
> context of the new hooks.
>
> You should be able to find a good example in the current tarbell under,
> ./Open-ILS/examples/action_trigger_filters.json.example
>
> Maybe that would help.
>
> Steven Callender
> Support Manager
> Equinox Open Library Initiative
> phone: +1 (877) Open-ILS (673-6457)
> email: stevecallender at equinoxOLI.org
> <mailto:stevecallender at EquinoxInitiative.org>
> web:https://equinoxOLI.org/ <https://equinoxinitiative.org/>
>
>
>
>
> On Mon, Jul 11, 2022 at 3:40 PM Linda Jansová via Evergreen-general
> <evergreen-general at list.evergreen-ils.org> wrote:
>
> Hi Michele,
>
> Thank you very much for all the suggestions including the SQL
> command which I find very helpful for the debugging process!
>
> Linda
>
> On 7/11/22 17:12, Morgan, Michele wrote:
>> Hi Linda,
>>
>> We have had triggers running using both the au.created and
>> au.expired hooks for some time without problems. We've had
>> success with them configured at both the consortium and system
>> levels.
>>
>> Our configurations are similar to the stock ones you referenced.
>> Of course, we have set Enabled to TRUE, whereas they are not
>> enabled by default.
>>
>> We also use a granularity and custom filter, but adding those
>> elements will not make triggers succeed that are failing.
>>
>> Here is our crontab entry for running the new user action trigger:
>>
>> # New User Welcome Message - check every 2 minutes
>> */2 * * * * . ~/.bashrc && $EG_BIN_DIR/action_trigger_runner.pl
>> <http://action_trigger_runner.pl> --osrf-config $SRF_CORE
>> --process-hooks --run-pending --granularity welcome
>> --granularity-only --custom-filters
>> $AT_FILTERS/a_t_filters.welcome_public.json
>>
>> If you have access to the database, you can run this query as a
>> basic check to see if triggers specified by the event definition
>> id for the current day are processing:
>>
>> SELECT state, count(*)
>> FROM action_trigger.event
>> WHERE date(add_time) = date(now())
>> AND event_def = <event definition id>
>> GROUP BY 1
>> ORDER BY 1
>>
>> Hope this is helpful,
>> Michele
>>
>> --
>> Michele M. Morgan, Technical Support Analyst
>> North of Boston Library Exchange, Danvers Massachusetts
>> mmorgan at noblenet.org
>>
>>
>>
>> On Mon, Jul 11, 2022 at 7:40 AM Linda Jansová via
>> Evergreen-general <evergreen-general at list.evergreen-ils.org> wrote:
>>
>> Dear all,
>>
>> In our current 3.6 production system, we are trying to make
>> the following triggers work:
>>
>> * New User Created Welcome Notice using the au.created hook
>> (like this one:
>> https://demo.evergreencatalog.com/eg2/en-US/staff/admin/local/action_trigger/event_definition/109);
>> * 30 Day Account Expiration Courtesy Notice using the
>> au.expired hook (like this one:
>> https://demo.evergreencatalog.com/eg2/en-US/staff/admin/local/action_trigger/event_definition/108).
>>
>> In both cases we use the predefined triggers but not on the
>> consortium level as in the examples above - instead, they are
>> defined on a system level for a particular library system
>> (which I suppose should be fine (?)).
>>
>> So far the emails are not sent out as expected.
>>
>> Does anyone else also use these triggers/hooks? Could you
>> please share your working configuration (maybe including a
>> particular cron setup which is in your case relevant for this
>> hook)? Or is there a procedure to follow that may help in the
>> debugging process?
>>
>> Or do you have any idea about what might do the trick for
>> these two hooks in particular?
>>
>> Thank you very much!
>>
>> Linda
>>
>> _______________________________________________
>> Evergreen-general mailing list
>> Evergreen-general at list.evergreen-ils.org
>> http://list.evergreen-ils.org/cgi-bin/mailman/listinfo/evergreen-general
>>
>
> _______________________________________________
> Evergreen-general mailing list
> Evergreen-general at list.evergreen-ils.org
> http://list.evergreen-ils.org/cgi-bin/mailman/listinfo/evergreen-general
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://list.evergreen-ils.org/pipermail/evergreen-general/attachments/20220711/5245ac78/attachment-0001.htm>
More information about the Evergreen-general
mailing list