[Koha-bugs] [Bug 27421] New: Porting tools/stage-marc-import.pl to BackgroundJob
bugzilla-daemon at bugs.koha-community.org
bugzilla-daemon at bugs.koha-community.org
Wed Jan 13 12:18:05 CET 2021
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27421
Bug ID: 27421
Summary: Porting tools/stage-marc-import.pl to BackgroundJob
Change sponsored?: ---
Product: Koha
Version: 20.11
Hardware: All
OS: All
Status: NEW
Severity: enhancement
Priority: P5 - low
Component: MARC Bibliographic record staging/import
Assignee: koha-bugs at lists.koha-community.org
Reporter: domm at plix.at
QA Contact: testopia at bugs.koha-community.org
Hi!
I recently started to convert tools/stage-marc-import.pl to use the new
BackgroundJobs, because we're using the Plack version, which does not like the
old forking implementation. While I've realized now that we can still use the
old CGI script by running it directly via the frontend Apache, I'm not very
happy with this workaround.
So, here is my current first sort-of-working prototype:
https://github.com/Koha-Community/Koha/compare/master...domm:MARCImporter
Before I continue my work, I'd really appreciate some feedback if what I'm
doing makes sense and matches your general plans.
Obviously there is still a lot missing:
* Proper feedback after starting the staging process (i.e. a link to the job)
* Probably I will also need to check if the job has finished, and present a
link to the next step (copy the staged records into the library) (which AFAIK
will also need to be converted to BackgroundJobs)
I also have a few questions:
* Is it neccessary to get the job-size before starting it? If yes, then I
assume I'll have to first parse the MARC file to get the job size, throwing the
results away (and this might not work, because we want to do the parsing in the
background in the first place). Or is there an easy way to get the number of
records?
* When I try to update job_size later, I get an exception (something like
"job_size not tested")
* Can I actually use BatchStageMarcRecords in BackgroundJob?
* I see I can pass a batch size to BatchStageMarcRecords. But this will not
result in more forking? This is "only" used to fire the progress callback?
I'm also not sure if the bug tracker or the dev mailing list is the best place
to discuss my questions?
Anyway, looking forward to some feedback!
Greetings,
domm
--
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