mirror of
https://github.com/simon987/Simple-Incremental-Search-Tool.git
synced 2025-12-16 08:39:03 +00:00
Code cleanup
This commit is contained in:
@@ -12,6 +12,7 @@ from thumbnail import ThumbnailGenerator
|
||||
from storage import Directory
|
||||
import shutil
|
||||
import config
|
||||
from ctypes import c_char_p
|
||||
|
||||
|
||||
class RunningTask:
|
||||
@@ -166,15 +167,13 @@ class TaskManager:
|
||||
done.value = 1
|
||||
|
||||
def cancel_task(self):
|
||||
self.current_task = None
|
||||
self.current_process.terminate()
|
||||
self.current_task.done.value = 1
|
||||
|
||||
def check_new_task(self):
|
||||
|
||||
if self.current_task is None:
|
||||
for i in sorted(self.storage.tasks(), reverse=True):
|
||||
if not self.storage.tasks()[i].completed:
|
||||
self.start_task(self.storage.tasks()[i])
|
||||
self.start_task(self.storage.tasks()[i])
|
||||
else:
|
||||
if self.current_task.done.value == 1:
|
||||
|
||||
@@ -183,3 +182,4 @@ class TaskManager:
|
||||
self.current_task = None
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user