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

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Thu Feb 1 08:12:37 CET 2024


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

--- Comment #4 from Marcel de Rooy <m.de.rooy at rijksmuseum.nl> ---
(In reply to Tomás Cohen Arazi from comment #3)
> 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();
> }

Looks promising! Lets go there. Less_code_in_scripts++

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


More information about the Koha-bugs mailing list