Fix thread exit on blacklist
This commit is contained in:
@@ -39,13 +39,14 @@ class Worker:
|
||||
while not self.interrupt_flag['exit']:
|
||||
job = self.queue.get()
|
||||
|
||||
if (job is None) or (any(fnmatch(str(job.remote_path), x) for x in self.blacklist)):
|
||||
if job is None:
|
||||
logging.info('A worker thread exited')
|
||||
break
|
||||
elif isinstance(job.box_item, Folder):
|
||||
self.do_folder(job)
|
||||
else:
|
||||
self.do_file(job)
|
||||
if not (any(fnmatch(str(job.remote_path), x) for x in self.blacklist)):
|
||||
if isinstance(job.box_item, Folder):
|
||||
self.do_folder(job)
|
||||
else:
|
||||
self.do_file(job)
|
||||
self.queue.task_done()
|
||||
|
||||
def do_folder(self, job: Job):
|
||||
|
||||
Reference in New Issue
Block a user