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

Jonathan Druart <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[email protected]
                   |                            |ommunity.org

--- Comment #35 from Jonathan Druart <[email protected]> 
---
(In reply to Martin Renvoize from comment #33)
> Hmm.. on second thoughts I think this needs a bit more thought around how it
> may need to handle the 'type' argument that can be passed to the script.. I
> can see cases where one would want multiple runs of the script running side
> by side with distinct caller options.
> 
> I'll ponder that a little and perhaps add it as a qa followup.

Yes I agree, we should have a more flexible and generic approach.
We already handle similar race conditions for circulation notices (CHECKIN/OUT)
in C4::Circulation::SendCirculationAlert

The algorithm would be:

Get the notices to send
for each notice:
  start a transaction
  lock the table
  if the notice needs to be send (fetch the status):
    send the notice
    update the status
    release the lock
    commit the transaction
  else: # We certainly faced a race
    release the lock
    rollback # certainly useless as we did not modify anything

-- 
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[email protected]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to