[Koha-bugs] [Bug 35920] Centralize code from workers

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Wed Jan 31 18:47:10 CET 2024


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

--- Comment #3 from Tomás Cohen Arazi <tomascohen at gmail.com> ---
I like the concept.

Given the discussion Marcel is driving around rabbit vs. polling, why not
create some base class and then different classes implementing each
communication mechanism? That way each use case would be self-contained and
maintainble (i.e. one can fix a bug without possibly breaking the other use
case, etc).

Something like:

Koha::Worker
Koha::Worker::STOMP
Koha::Worker::Polling

and then the `background_jobs_worker.pl` script would just call


if ( C4::Context->use_stomp ) {
    Koha::Worker->new( 'STOMP' )->run();
}
else {
    Koha::Worker->new( 'Polling' )->run();
}

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


More information about the Koha-bugs mailing list