At desk notification gets cancelled if loan
is not indexed fast enough
#3005
Labels
bug
Breaks something but is not blocking
f: notifications
p-High
High priority (to be solved in the 2-3 next months)
Bug description:
Sometimes, the
at_desk
notification gets cancelled when it should be sent: item exists, loan exists, loan isAT_DESK
.Hypothesis: The notification processing takes places 1 second after the transaction. Depending on the server load at any given moment, the loan indexing may not be over when the notification is processed. The notification sees the old loan status and cancel the sending.
Expected behavior:
All
at_desk
notifications should be sent if configured as such.Steps to Reproduce:
Difficult to reproduce as it might depend on the server load. It happens regularly in production.
Example
The
availability
notification is correctly sent 5 minutes later.The loan is
ITEM_AT_DESK
but it was processed less than 1 second before the notification.Context
Server:
Version:
v1.11.0
Anything else?
To ensure that the notification gets the correct loan state, we might force it to wait the loan's reindexing or delay the notification processing by 30 secs-1min.
It would also be nice to have a more robust notification log, that allows us to see which check did not pass so that a notification was not sent.
The text was updated successfully, but these errors were encountered: