[Koha-bugs] [Bug 15854] Race condition for sending renewal/check-in notices

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Thu Apr 13 02:19:45 CEST 2017


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15854

--- Comment #19 from David Cook <dcook at prosentient.com.au> ---
Why aren't we logging individual events (e.g. checkout, checkin, renew, etc),
and then bundling them together before sending out notices if they're digests?

If it's not a digest, you could log it and run generate_notice which puts it
into a mail queue.

If it is a digest, you could log it with a digest/delay flag. Then periodically
(e.g. every fifteen minutes), you could group_by to get the patron ids for all
digests, then iterate through each patron while getting all the digest events
for that patron, and then queue an email. 

process_message_queue could then just run like normal.

I think that would be a lot simpler than using locks. 

After all, the message_queue should just be FIFO, right? Once it's in there,
it's in there as a finished product ready to go out.

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list