Bug 29388 - No need to decode data from misc/background_jobs_worker.pl
Summary: No need to decode data from misc/background_jobs_worker.pl
Status: CLOSED INVALID
Alias: None
Product: Koha
Classification: Unclassified
Component: Architecture, internals, and plumbing (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Jonathan Druart
QA Contact: Testopia
URL:
Keywords:
Depends on: 22417
Blocks:
  Show dependency treegraph
 
Reported: 2021-11-02 11:26 UTC by Jonathan Druart
Modified: 2022-06-06 20:25 UTC (History)
0 users

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 29388: don't decode data from misc/background_jobs_worker.pl (13.34 KB, patch)
2021-11-02 11:27 UTC, Jonathan Druart
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Jonathan Druart 2021-11-02 11:26:55 UTC
From misc/background_jobs_worker.pl we are decoding the data, and pass it as an argument to ->process, this is a bit weird as we are fetching the job from ->process we could retrieve the data from there.
Comment 1 Jonathan Druart 2021-11-02 11:27:42 UTC
Created attachment 127211 [details] [review]
Bug 29388: don't decode data from misc/background_jobs_worker.pl
Comment 2 Jonathan Druart 2021-11-02 11:29:59 UTC
Logging that here as I won't do the same mistake again.
This is actually invalid, see the FIXME:

 59         # FIXME This means we need to have create the DB entry before
 60         # It could work in a first step, but then we will want to handle job that will be created from the message received
 61         my $job = Koha::BackgroundJobs->find($args->{job_id});

We actually need a way to enqueue without creating the row in DB, sending the request to RabbitMQ would be enough.

Isn't it?