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

--- Comment #8 from David Cook <[email protected]> ---
(In reply to Jonathan Druart from comment #6)
> Nick suggested me to set the status to "failed" in case the job was not
> enqueued.
> I am not sure it's the best we can do.
> 
> If a job is started but the connection failed, the exception will be thrown
> but the job will appear in the DB table. If the user already got the error
> on the UI I don't know if the job should be inserted.

You could test the MQ connection before inserting into the database. 

But if the MQ connection succeeds, you have to insert into the database before
sending the message to the MQ. Otherwise that race condition will persist.

If the "send_with_receipt" fails, then I think marking the job as "failed"
would be fair. (Alternatively, I suppose you could delete the job after warning
the user it failed.)

-- 
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[email protected]
https://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