[Bug 30360] New: Add helper methods to Koha::BackgroundJobs
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30360 Bug ID: 30360 Summary: Add helper methods to Koha::BackgroundJobs Change sponsored?: --- Product: Koha Version: unspecified Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Architecture, internals, and plumbing Assignee: koha-bugs@lists.koha-community.org Reporter: tomascohen@gmail.com QA Contact: testopia@bugs.koha-community.org It would be handy to have background jobs just call a simple method for: * Setting the job as started * Updating the progress * Setting as finished -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30360 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |29346 Assignee|koha-bugs@lists.koha-commun |tomascohen@gmail.com |ity.org | Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29346 [Bug 29346] Add real-time holds queue update option -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30360 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Trivial patch Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30360 --- Comment #1 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 132247 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=132247&action=edit Bug 30360: Add helper methods to Koha::BackgroundJobs This patch adds some helper methods to ease writing background jobs, and also making it more consistent/solid. To test: 1. Apply this patch 2. Run: $ kshell k$ prove t/db_dependent/Koha/BackgroundJob.t => SUCCESS: Tests pass. The methods have the expected behaviour. 3. Sign off :-D Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30360 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart+koha@gmail. | |com --- Comment #2 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- What about retry? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30360 --- Comment #3 from Tomás Cohen Arazi <tomascohen@gmail.com> --- (In reply to Jonathan Druart from comment #2)
What about retry?
Yeah, I thought about it, and like the idea. It would involve (maybe) a new status which by the way we should move into an ENUM. I left it out only because I believe we need to also think of 'all or nothing' vs 'partial success' tasks. We should support both, in my opinion. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30360 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dcook@prosentient.com.au, | |julian.maurice@biblibre.com | |, | |martin.renvoize@ptfs-europe | |.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30360 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |27344 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27344 [Bug 27344] Implement Elastic's update_index_background using Koha::BackgroundJob -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30360 --- Comment #4 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 132952 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=132952&action=edit Bug 30360: Add methods for dealing with the JSON payload This patch adds high-level methods to handle the JSON payload (de)serialization as needed. This allows devs implementing background jobs to abstract themselves from the internals of the jobs handling. To test: 1. Apply this patch 2. Run: $ kshell k$ prove t/db_dependent/Koha/BackgroundJob.t => SUCCESS: Tests pass! 3. Sign off :-D Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30360 --- Comment #5 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 132953 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=132953&action=edit Bug 30360: Make UpdateElasticIndex use the helper methods Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30360 --- Comment #6 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Looking forward to this one :) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30360 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on|29346 | Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29346 [Bug 29346] Add real-time holds queue update option -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30360 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |tomascohen@gmail.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30360 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #132952|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30360 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #132953|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30360 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #132247|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30360 --- Comment #7 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 134414 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=134414&action=edit Bug 30360: Add helper methods to Koha::BackgroundJobs This patch adds some helper methods to ease writing background jobs, and also making it more consistent/solid. To test: 1. Apply this patch 2. Run: $ kshell k$ prove t/db_dependent/Koha/BackgroundJob.t => SUCCESS: Tests pass. The methods have the expected behaviour. 3. Sign off :-D Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30360 --- Comment #8 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 134415 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=134415&action=edit Bug 30360: Add methods for dealing with the JSON payload This patch adds high-level methods to handle the JSON payload (de)serialization as needed. This allows devs implementing background jobs to abstract themselves from the internals of the jobs handling. To test: 1. Apply this patch 2. Run: $ kshell k$ prove t/db_dependent/Koha/BackgroundJob.t => SUCCESS: Tests pass! 3. Sign off :-D Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30360 --- Comment #9 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 134416 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=134416&action=edit Bug 30360: Make UpdateElasticIndex use the helper methods Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30360 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30360 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #134414|0 |1 is obsolete| | --- Comment #10 from David Nind <david@davidnind.com> --- Created attachment 134417 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=134417&action=edit Bug 30360: Add helper methods to Koha::BackgroundJobs This patch adds some helper methods to ease writing background jobs, and also making it more consistent/solid. To test: 1. Apply this patch 2. Run: $ kshell k$ prove t/db_dependent/Koha/BackgroundJob.t => SUCCESS: Tests pass. The methods have the expected behaviour. 3. Sign off :-D Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30360 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #134415|0 |1 is obsolete| | --- Comment #11 from David Nind <david@davidnind.com> --- Created attachment 134418 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=134418&action=edit Bug 30360: Add methods for dealing with the JSON payload This patch adds high-level methods to handle the JSON payload (de)serialization as needed. This allows devs implementing background jobs to abstract themselves from the internals of the jobs handling. To test: 1. Apply this patch 2. Run: $ kshell k$ prove t/db_dependent/Koha/BackgroundJob.t => SUCCESS: Tests pass! 3. Sign off :-D Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30360 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #134416|0 |1 is obsolete| | --- Comment #12 from David Nind <david@davidnind.com> --- Created attachment 134419 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=134419&action=edit Bug 30360: Make UpdateElasticIndex use the helper methods Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30360 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |jonathan.druart+koha@gmail. |y.org |com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30360 --- Comment #13 from Tomás Cohen Arazi <tomascohen@gmail.com> --- (In reply to David Nind from comment #11)
Signed-off-by: David Nind <david@davidnind.com>
Thanks, David!! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30360 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #134417|0 |1 is obsolete| | --- Comment #14 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 134631 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=134631&action=edit Bug 30360: Add helper methods to Koha::BackgroundJobs This patch adds some helper methods to ease writing background jobs, and also making it more consistent/solid. To test: 1. Apply this patch 2. Run: $ kshell k$ prove t/db_dependent/Koha/BackgroundJob.t => SUCCESS: Tests pass. The methods have the expected behaviour. 3. Sign off :-D Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30360 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #134418|0 |1 is obsolete| | --- Comment #15 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 134632 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=134632&action=edit Bug 30360: Add methods for dealing with the JSON payload This patch adds high-level methods to handle the JSON payload (de)serialization as needed. This allows devs implementing background jobs to abstract themselves from the internals of the jobs handling. To test: 1. Apply this patch 2. Run: $ kshell k$ prove t/db_dependent/Koha/BackgroundJob.t => SUCCESS: Tests pass! 3. Sign off :-D Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30360 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #134419|0 |1 is obsolete| | --- Comment #16 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 134633 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=134633&action=edit Bug 30360: Make UpdateElasticIndex use the helper methods Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30360 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30360 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|jonathan.druart+koha@gmail. |martin.renvoize@ptfs-europe |com |.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30360 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |rel_22_05_candidate --- Comment #17 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Ack, I actually QA'd this soon after David's SO and then promptly got interrupted before uploading the patches and changing the status. It's a really solid improvement and does no harm so I'm marking it as a 22.05 candidate. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30360 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |30692 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30692 [Bug 30692] Wrong progress displayed for ES indexing tasks -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30360 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |27341 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27341 [Bug 27341] Performance 21.05 - Omnibus -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30360 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to master --- Comment #18 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Pushed for 22.05, thanks to everyone involved :).. dependency for trivial bug 30362 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30360 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |fridolin.somers@biblibre.co | |m Version(s)| |22.05.00 released in| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30360 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |30734 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30734 [Bug 30734] t/db_dependent/Koha/BackgroundJob.t fails on D9 and D10 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30360 Bug 30360 depends on bug 27344, which changed state. Bug 27344 Summary: Implement Elastic's update_index_background using Koha::BackgroundJob https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27344 What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to master |RESOLVED Resolution|--- |FIXED -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30360 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |kyle@bywatersolutions.com Status|Pushed to master |RESOLVED Resolution|--- |FIXED -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30360 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords|rel_22_05_candidate | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30360 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |30943 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30943 [Bug 30943] Make background job classes use helpers -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30360 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |31351 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31351 [Bug 31351] Worker dies on reindex job when operator last name/first name/branch name contains non-ASCII chars -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org