diff --git a/calibre-plugin/fff_plugin.py b/calibre-plugin/fff_plugin.py index 96dd1153..43c2fd54 100644 --- a/calibre-plugin/fff_plugin.py +++ b/calibre-plugin/fff_plugin.py @@ -1700,9 +1700,8 @@ class FanFicFarePlugin(InterfaceAction): options['plugin_path'] = self.interface_action_base_plugin.plugin_path func = 'arbitrary_n' - cpus = self.gui.job_manager.server.pool_size args = ['calibre_plugins.fanficfare_plugin.jobs', 'do_download_worker', - (book_list, options, cpus, merge)] + (book_list, options, merge)] desc = _('Download %s FanFiction Book(s)') % sum(1 for x in book_list if x['good']) job = self.gui.job_manager.run_job( self.Dispatcher(partial(self.download_list_completed,options=options,merge=merge)), diff --git a/calibre-plugin/jobs.py b/calibre-plugin/jobs.py index f5916e69..2a814aa4 100644 --- a/calibre-plugin/jobs.py +++ b/calibre-plugin/jobs.py @@ -39,16 +39,19 @@ except NameError: def do_download_worker(book_list, options, - cpus, merge=False, notification=lambda x,y:x): ''' - Coordinator job, to launch child jobs to extract ISBN for a set of books + Coordinator job, to launch child jobs to do downloads. This is run as a worker job in the background to keep the UI more - responsive and get around the memory leak issues as it will launch + responsive and get around any memory leak issues as it will launch a child job for each book as a worker process ''' - server = Server(pool_size=cpus) + ## pool_size reduced to 1 to prevent parallel downloads on the + ## same site. Also prevents parallel downloads on different + ## sites. Might do something different to allow that again + ## someday. + server = Server(pool_size=1) logger.info(options['version']) total = 0