View Single Post
Old 07-07-2019, 12:43 PM   #3570
JimmXinu
Plugin Developer
JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.
 
JimmXinu's Avatar
 
Posts: 6,994
Karma: 4604635
Join Date: Dec 2011
Location: Midwest USA
Device: Kobo Clara Colour running KOReader
Quote:
Originally Posted by JimmXinu View Post
Quote:
Originally Posted by Ser4nb2LUY6e View Post
Maybe schedule the individual books as individual jobs, but have a global list with domain name + lock (whatever that is in python) and acquire the lock while loading a page from that domain.
Because Calibre runs on Windows, Linux and MacOS, it's difficult to implement IPC between threads in subprocesses.

I will think about this some more.
I have looked into this a bit more. Calibre has a mechanism for limiting the number of BG jobs actively running at a time, which could reasonably be assumed to be an acceptable limit. But there are issues with that, namely, that as each job finishes it calls the 'Proceed to Update Library' dialog for each one. So you have click 'Yes' for each one.

FFF could gather all those updates and do 'Proceed' once, but it's kinda complicated. The sort of async that is hard to get right the first time and difficult to debug.

Plus FFF's background job is already coded to run CPU#(from Calibre settings) threads simultaneously. I've checked and I can see different the threads running concurrently.

All in all, I don't think BG job per download is worth pursuing any further.
JimmXinu is offline   Reply With Quote