[Koha-bugs] [Bug 30654] Even with RabbitMQ enabled, we should poll the database for jobs at worker startup

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Tue Jun 28 03:13:25 CEST 2022


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

--- Comment #8 from David Cook <dcook at prosentient.com.au> ---
(In reply to Martin Renvoize from comment #0)
> Our worker currently starts up and immediately tries to listen for jobs
> being passed via STOMP.  However, if rabbitMQ wasn't running when the tasks
> were enqueue, then the worker will never know about them.
> 
> We should work through the outstanding queue before listening for new jobs.

I was thinking about this again as I'm building a RabbitMQ based job queue for
a different Perl project.

(Part of me thought maybe I should just use Minion, but the Perl and DB
dependencies aren't available and I'm already using RabbitMQ for other
asynchronous work on that system.)

It seems to me that the order of operations should be the following:

1. Connect to RabbitMQ
2. Insert job in DB
3. Commit job in DB
4. Send message to a durable RabbitMQ queue
5. Output result of send message to user
5a. If successful, say job has been created
5b. If unsuccessful, say there was a problem creating job and to contact an
administrator

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


More information about the Koha-bugs mailing list