[Koha-bugs] [Bug 32305] Background worker doesn't check jobs receive from rabbitmq are in 'new' state
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32305 Marcel de Rooy changed: What|Removed |Added Assignee|koha-b...@lists.koha-commun |m.de.r...@rijksmuseum.nl |ity.org | Status|Failed QA |ASSIGNED --- Comment #19 from Marcel de Rooy --- (In reply to Jonathan Druart from comment #18) > I won't have more time to dedicate to this, feel free to take over. I will now in light of the pending bug 34990. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org 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/
[Koha-bugs] [Bug 32305] Background worker doesn't check jobs receive from rabbitmq are in 'new' state
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32305 Marcel de Rooy changed: What|Removed |Added QA Contact|m.de.r...@rijksmuseum.nl|testo...@bugs.koha-communit ||y.org -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org 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/
[Koha-bugs] [Bug 32305] Background worker doesn't check jobs receive from rabbitmq are in 'new' state
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32305 --- Comment #20 from Marcel de Rooy --- My solution is resolve the inconsistency between MQ and DB "mode": MQ my $job = Koha::BackgroundJobs->find($args->{job_id}); DB my $jobs = Koha::BackgroundJobs->search({ status => 'new', queue => \@queues }); We should do the same checks for MQ mode, so: my $job = Koha::BackgroundJobs->search( { id => $args->{job_id}, status => 'new, queue => \@queues } ); So check status new AND check queue. -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org 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/
[Koha-bugs] [Bug 32305] Background worker doesn't check jobs receive from rabbitmq are in 'new' state
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32305 Marcel de Rooy changed: What|Removed |Added See Also||https://bugs.koha-community ||.org/bugzilla3/show_bug.cgi ||?id=34990 -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org 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/
[Koha-bugs] [Bug 32305] Background worker doesn't check jobs receive from rabbitmq are in 'new' state
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32305 Marcel de Rooy changed: What|Removed |Added Attachment #144389|0 |1 is obsolete|| -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org 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/
[Koha-bugs] [Bug 32305] Background worker doesn't check jobs receive from rabbitmq are in 'new' state
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32305 Marcel de Rooy changed: What|Removed |Added Status|ASSIGNED|Needs Signoff Patch complexity|--- |Trivial patch -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org 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/
[Koha-bugs] [Bug 32305] Background worker doesn't check jobs receive from rabbitmq are in 'new' state
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32305 --- Comment #21 from Marcel de Rooy --- Created attachment 157256 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=157256&action=edit Bug 32305: Worker should ignore wrong status or queue in MQ mode MQ mode: The worker has seen that MQ is running and consumes messages instead of polling db only. Test plan: Stop worker for long tasks. Make sure that Rabbit MQ runs. Stage a file. (This adds a long task.) Goto staff view of jobs and cancel this job. Check if job is still in MQ with rabbitmqctl list_queues. Now start worker for long tasks. Check if job is gone in MQ with rabbitmqctl list_queues. And check logfile for the adjusted warning like: [WARN] Job 5 not found, or has wrong status/queue main:: /usr/share/koha/misc/workers/background_jobs_worker.pl (134) Signed-off-by: Marcel de Rooy -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org 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/
[Koha-bugs] [Bug 32305] Background worker doesn't check jobs receive from rabbitmq are in 'new' state
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32305 Fridolin Somers changed: What|Removed |Added See Also||https://bugs.koha-community ||.org/bugzilla3/show_bug.cgi ||?id=31245 -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org 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/
[Koha-bugs] [Bug 32305] Background worker doesn't check jobs receive from rabbitmq are in 'new' state
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32305 Marcel de Rooy changed: What|Removed |Added CC||m.de.r...@rijksmuseum.nl --- Comment #11 from Marcel de Rooy --- Please tell me what we are still discussing here? I came from 30943 which is mnore or less linked to this dev. -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org 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/
[Koha-bugs] [Bug 32305] Background worker doesn't check jobs receive from rabbitmq are in 'new' state
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32305 Tomás Cohen Arazi changed: What|Removed |Added Blocks||32395 --- Comment #12 from Tomás Cohen Arazi --- Let's move forward with Jonathan's approach, and please add the refetch. We then make bug 32395 depend on this one, for further cleanup. Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32395 [Bug 32395] Why do we send jobs params to the broker -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org 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/
[Koha-bugs] [Bug 32305] Background worker doesn't check jobs receive from rabbitmq are in 'new' state
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32305 Tomás Cohen Arazi changed: What|Removed |Added Attachment #144156|0 |1 is obsolete|| -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org 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/
[Koha-bugs] [Bug 32305] Background worker doesn't check jobs receive from rabbitmq are in 'new' state
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32305 Tomás Cohen Arazi changed: What|Removed |Added Attachment #144278|0 |1 is obsolete|| -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org 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/
[Koha-bugs] [Bug 32305] Background worker doesn't check jobs receive from rabbitmq are in 'new' state
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32305 Tomás Cohen Arazi changed: What|Removed |Added Status|In Discussion |Signed Off Assignee|didier.gautheron@biblibre.c |jonathan.druart+koha@gmail. |om |com Keywords||additional_work_needed -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org 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/
[Koha-bugs] [Bug 32305] Background worker doesn't check jobs receive from rabbitmq are in 'new' state
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32305 --- Comment #13 from Jonathan Druart --- I don't understand why we would need a fetch here, and I actually think we should not get from db. The ->process call is from the worker, which should happen right after ->find. If the object does not have a status==new then we should explode as the developer certainly messed up with something. -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org 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/
[Koha-bugs] [Bug 32305] Background worker doesn't check jobs receive from rabbitmq are in 'new' state
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32305 Jonathan Druart changed: What|Removed |Added Keywords|additional_work_needed | -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org 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/
[Koha-bugs] [Bug 32305] Background worker doesn't check jobs receive from rabbitmq are in 'new' state
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32305 Marcel de Rooy changed: What|Removed |Added Status|Signed Off |BLOCKED QA Contact|testo...@bugs.koha-communit |m.de.r...@rijksmuseum.nl |y.org | --- Comment #14 from Marcel de Rooy --- Looking here -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org 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/
[Koha-bugs] [Bug 32305] Background worker doesn't check jobs receive from rabbitmq are in 'new' state
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32305 --- Comment #15 from Marcel de Rooy --- (In reply to Jonathan Druart from comment #5) > Patch for discussion, will need tests if we go with it. This speaks for itself :) -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org 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/
[Koha-bugs] [Bug 32305] Background worker doesn't check jobs receive from rabbitmq are in 'new' state
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32305 --- Comment #16 from Marcel de Rooy --- How much sense does it make to check the status in the base object if most background jobs override it with their own? Hmm, looks like we always start in the base object and go to derived class.. And note that derived often begins with a ->start that contains an exception already for a status <> new. Should we add the start in the general process instead ? -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org 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/
[Koha-bugs] [Bug 32305] Background worker doesn't check jobs receive from rabbitmq are in 'new' state
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32305 --- Comment #17 from Marcel de Rooy --- (In reply to Jonathan Druart from comment #13) > I don't understand why we would need a fetch here, and I actually think we > should not get from db. > > The ->process call is from the worker, which should happen right after > ->find. If the object does not have a status==new then we should explode as > the developer certainly messed up with something. Sounds good to me. -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org 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/
[Koha-bugs] [Bug 32305] Background worker doesn't check jobs receive from rabbitmq are in 'new' state
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32305 Marcel de Rooy changed: What|Removed |Added Status|BLOCKED |Failed QA -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org 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/
[Koha-bugs] [Bug 32305] Background worker doesn't check jobs receive from rabbitmq are in 'new' state
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32305 Jonathan Druart changed: What|Removed |Added Assignee|jonathan.druart+koha@gmail. |koha-b...@lists.koha-commun |com |ity.org -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org 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/
[Koha-bugs] [Bug 32305] Background worker doesn't check jobs receive from rabbitmq are in 'new' state
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32305 --- Comment #18 from Jonathan Druart --- I won't have more time to dedicate to this, feel free to take over. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org 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/
[Koha-bugs] [Bug 32305] Background worker doesn't check jobs receive from rabbitmq are in 'new' state.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32305 Amit Gupta changed: What|Removed |Added Summary|Backround worker doesn't|Background worker doesn't |check jobs receive from |check jobs receive from |rabbitmq are in 'new' |rabbitmq are in 'new' |state. |state. -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org 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/
[Koha-bugs] [Bug 32305] Background worker doesn't check jobs receive from rabbitmq are in 'new' state
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32305 Katrin Fischer changed: What|Removed |Added Summary|Background worker doesn't |Background worker doesn't |check jobs receive from |check jobs receive from |rabbitmq are in 'new' |rabbitmq are in 'new' state |state. | -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org 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/
[Koha-bugs] [Bug 32305] Background worker doesn't check jobs receive from rabbitmq are in 'new' state
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32305 Jonathan Druart changed: What|Removed |Added CC||dc...@prosentient.com.au, ||jonathan.druart+koha@gmail. ||com, ||martin.renvoize@ptfs-europe ||.com, tomasco...@gmail.com --- Comment #3 from Jonathan Druart --- I am not sure this is the correct place, shouldn't it be in Koha::BackgroundJob->process? -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org 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/
[Koha-bugs] [Bug 32305] Background worker doesn't check jobs receive from rabbitmq are in 'new' state
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32305 --- Comment #4 from Jonathan Druart --- Created attachment 144278 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=144278&action=edit [ALTERNATIVE-PATCH] Bug 32305: Don't process a job if its status is not 'new' -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org 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/
[Koha-bugs] [Bug 32305] Background worker doesn't check jobs receive from rabbitmq are in 'new' state
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32305 Jonathan Druart changed: What|Removed |Added Status|Needs Signoff |In Discussion --- Comment #5 from Jonathan Druart --- Patch for discussion, will need tests if we go with it. -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org 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/
[Koha-bugs] [Bug 32305] Background worker doesn't check jobs receive from rabbitmq are in 'new' state
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32305 --- Comment #6 from Martin Renvoize --- I think Jonathans approach is the right way to go.. Though I must admit, I found it confusing when looking at the 'start' helper method too.. that already checks status and throws an exception if the status isn't new. Having both 'process' and 'start' methods is a tad confusing. -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org 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/
[Koha-bugs] [Bug 32305] Background worker doesn't check jobs receive from rabbitmq are in 'new' state
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32305 --- Comment #7 from Martin Renvoize --- Created attachment 144389 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=144389&action=edit Bug 32305: Don't process a job if its status is not 'new' Signed-off-by: Martin Renvoize -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org 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/
[Koha-bugs] [Bug 32305] Background worker doesn't check jobs receive from rabbitmq are in 'new' state
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32305 --- Comment #8 from Martin Renvoize --- Should we force a refetch from the DB just prior to checking this status.. just in case we have a stale object? -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org 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/
[Koha-bugs] [Bug 32305] Background worker doesn't check jobs receive from rabbitmq are in 'new' state
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32305 --- Comment #9 from Fridolin Somers --- (In reply to Martin Renvoize from comment #8) > Should we force a refetch from the DB just prior to checking this status.. > just in case we have a stale object? Sounds like a good idea to me -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org 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/
[Koha-bugs] [Bug 32305] Background worker doesn't check jobs receive from rabbitmq are in 'new' state
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32305 --- Comment #10 from David Cook --- (In reply to Martin Renvoize from comment #8) > Should we force a refetch from the DB just prior to checking this status.. > just in case we have a stale object? I suppose this goes back to what Jonathan was saying at bug 32395... -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org 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/