mirror of
https://github.com/derrod/legendary.git
synced 2024-12-22 17:55:27 +00:00
[downloader] Fix log message and close shared memory on exit
This commit is contained in:
parent
04cc72d154
commit
78d745b03f
|
@ -42,7 +42,7 @@ class DLWorker(Process):
|
||||||
continue
|
continue
|
||||||
|
|
||||||
if job.kill: # let worker die
|
if job.kill: # let worker die
|
||||||
self.log.info(f'[{self.name}] Queue Empty, waiting for more...')
|
self.log.info(f'[{self.name}] Worker received kill signal, shutting down...')
|
||||||
break
|
break
|
||||||
|
|
||||||
tries = 0
|
tries = 0
|
||||||
|
@ -99,6 +99,8 @@ class DLWorker(Process):
|
||||||
self.o_q.put(DownloaderTaskResult(success=False, chunk_guid=job.guid, shm=job.shm, url=job.url))
|
self.o_q.put(DownloaderTaskResult(success=False, chunk_guid=job.guid, shm=job.shm, url=job.url))
|
||||||
continue
|
continue
|
||||||
|
|
||||||
|
self.shm.close()
|
||||||
|
|
||||||
|
|
||||||
class FileWorker(Process):
|
class FileWorker(Process):
|
||||||
def __init__(self, queue, out_queue, base_path, shm, cache_path=None):
|
def __init__(self, queue, out_queue, base_path, shm, cache_path=None):
|
||||||
|
|
Loading…
Reference in a new issue