[Koha-bugs] [Bug 30350] Do not hardcode job types

2022-04-29 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30350

Martin Renvoize  changed:

   What|Removed |Added

 CC||martin.renvoize@ptfs-europe
   ||.com
 Resolution|--- |DUPLICATE
 Status|ASSIGNED|RESOLVED

--- Comment #7 from Martin Renvoize  ---
We opted for Queues in bug 27783.. marking as Resolved Fixed

*** This bug has been marked as a duplicate of bug 27783 ***

-- 
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 30350] Do not hardcode job types

2022-04-29 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30350
Bug 30350 depends on bug 30172, which changed state.

Bug 30172 Summary: Background jobs failing due to race condition
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30172

   What|Removed |Added

 Status|Pushed to oldoldstable  |RESOLVED
 Resolution|--- |FIXED

-- 
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 30350] Do not hardcode job types

2022-04-01 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30350

Tomás Cohen Arazi  changed:

   What|Removed |Added

 Status|Passed QA   |ASSIGNED

--- Comment #6 from Tomás Cohen Arazi  ---
I would like to take this out of the RM queue for now, as work on bug 27783
might make this require some changes.

If someone (including me) finds this is still relevant, let's make it PQA
again.

Thanks Kyle!

-- 
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 30350] Do not hardcode job types

2022-04-01 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30350

Kyle M Hall  changed:

   What|Removed |Added

 Attachment #132298|0   |1
is obsolete||

--- Comment #5 from Kyle M Hall  ---
Created attachment 132857
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=132857=edit
Bug 30350: Avoid hardcoding job types in background_jobs_worker.pl

Currently, background_jobs_worker.pl has a hardcoded list of jobs it can
process. Koha::BackgroundJob already has a method that can be used to
extract such list. Using it would avoid having to maintain two lists,
and it would also make it easier to inject plugin tasks as well.

To test:
1. Apply the patch
2. Restart the koha-worker
3. Run one of the batch operations that make use of the background jobs
   (I used batch item delete)
=> SUCCESS: Things work, no change
4. Sign off :-D

Signed-off-by: Tomas Cohen Arazi 

JD amended patch
-my @job_types = keys %{Koha::BackgroundJob::type_to_class_mapping};
+my @job_types = keys %{Koha::BackgroundJob::type_to_class_mapping()};
To remove the following error:
Ambiguous use of %{Koha::BackgroundJob::type_to_class_mapping} resolved to
%Koha::BackgroundJob::type_to_class_mapping
Signed-off-by: Jonathan Druart 

Signed-off-by: Kyle M Hall 

-- 
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 30350] Do not hardcode job types

2022-04-01 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30350

Kyle M Hall  changed:

   What|Removed |Added

 Status|Signed Off  |Passed 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 30350] Do not hardcode job types

2022-04-01 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30350

Kyle M Hall  changed:

   What|Removed |Added

 QA Contact|testo...@bugs.koha-communit |k...@bywatersolutions.com
   |y.org   |
 CC||k...@bywatersolutions.com

-- 
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 30350] Do not hardcode job types

2022-03-28 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30350

Jonathan Druart  changed:

   What|Removed |Added

 Attachment #132246|0   |1
is obsolete||

--- Comment #4 from Jonathan Druart  ---
Created attachment 132298
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=132298=edit
Bug 30350: Avoid hardcoding job types in background_jobs_worker.pl

Currently, background_jobs_worker.pl has a hardcoded list of jobs it can
process. Koha::BackgroundJob already has a method that can be used to
extract such list. Using it would avoid having to maintain two lists,
and it would also make it easier to inject plugin tasks as well.

To test:
1. Apply the patch
2. Restart the koha-worker
3. Run one of the batch operations that make use of the background jobs
   (I used batch item delete)
=> SUCCESS: Things work, no change
4. Sign off :-D

Signed-off-by: Tomas Cohen Arazi 

JD amended patch
-my @job_types = keys %{Koha::BackgroundJob::type_to_class_mapping};
+my @job_types = keys %{Koha::BackgroundJob::type_to_class_mapping()};
To remove the following error:
Ambiguous use of %{Koha::BackgroundJob::type_to_class_mapping} resolved to
%Koha::BackgroundJob::type_to_class_mapping
Signed-off-by: Jonathan Druart 

-- 
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 30350] Do not hardcode job types

2022-03-28 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30350

Jonathan Druart  changed:

   What|Removed |Added

 Status|Needs Signoff   |Signed Off

-- 
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 30350] Do not hardcode job types

2022-03-27 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30350

David Cook  changed:

   What|Removed |Added

 CC||dc...@prosentient.com.au

-- 
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 30350] Do not hardcode job types

2022-03-25 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30350

--- Comment #3 from Tomás Cohen Arazi  ---
(In reply to Jonathan Druart from comment #2)
> The point was to have different workers with different job types.

Yeah, I get it, but it is not implemented yet, right? Let's talk about it on
monday :-D

-- 
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 30350] Do not hardcode job types

2022-03-25 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30350

Tomás Cohen Arazi  changed:

   What|Removed |Added

   See Also||https://bugs.koha-community
   ||.org/bugzilla3/show_bug.cgi
   ||?id=27434

-- 
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 30350] Do not hardcode job types

2022-03-25 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30350

Jonathan Druart  changed:

   What|Removed |Added

 CC||jonathan.druart+koha@gmail.
   ||com

--- Comment #2 from Jonathan Druart  ---
The point was to have different workers with different job types.

-- 
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 30350] Do not hardcode job types

2022-03-25 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30350

Tomás Cohen Arazi  changed:

   What|Removed |Added

   Assignee|koha-b...@lists.koha-commun |tomasco...@gmail.com
   |ity.org |
 Status|NEW |Needs Signoff
 Depends on||30172


Referenced Bugs:

https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30172
[Bug 30172] Background jobs failing due to race condition
-- 
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 30350] Do not hardcode job types

2022-03-25 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30350

--- Comment #1 from Tomás Cohen Arazi  ---
Created attachment 132246
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=132246=edit
Bug 30350: Avoid hardcoding job types in background_jobs_worker.pl

Currently, background_jobs_worker.pl has a hardcoded list of jobs it can
process. Koha::BackgroundJob already has a method that can be used to
extract such list. Using it would avoid having to maintain two lists,
and it would also make it easier to inject plugin tasks as well.

To test:
1. Apply the patch
2. Restart the koha-worker
3. Run one of the batch operations that make use of the background jobs
   (I used batch item delete)
=> SUCCESS: Things work, no change
4. Sign off :-D

Signed-off-by: Tomas Cohen Arazi 

-- 
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 30350] Do not hardcode job types

2022-03-25 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30350

Fridolin Somers  changed:

   What|Removed |Added

 CC||fridolin.som...@biblibre.co
   ||m

-- 
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/