diff --git a/app/util/task_util.py b/app/util/task_util.py index 85a8959d..47975ad9 100644 --- a/app/util/task_util.py +++ b/app/util/task_util.py @@ -22,8 +22,6 @@ def scan_func(task, socket, dataset): pass for file in files: - time.sleep() - path = os.path.join(root, file) if path.endswith(ImageModel.PATTERN): @@ -92,7 +90,7 @@ def import_coco_func(task, socket, dataset, coco_json): # update progress progress += 1 - task.set_progress((progress/total_items)*100) + task.set_progress((progress/total_items)*100, socket=socket) dataset.update(set__categories=dataset.categories) @@ -107,7 +105,7 @@ def import_coco_func(task, socket, dataset, coco_json): # update progress progress += 1 - task.set_progress((progress/total_items)*100) + task.set_progress((progress/total_items)*100, socket=socket) image_model = images.filter(file_name__exact=image_filename).all() @@ -132,7 +130,7 @@ def import_coco_func(task, socket, dataset, coco_json): is_crowd = annotation.get('iscrowed', False) progress += 1 - task.set_progress((progress/total_items)*100) + task.set_progress((progress/total_items)*100, socket=socket) if len(segmentation) == 0: task.warning(f"Annotation {annotation.get('id')} has no segmentation") @@ -167,6 +165,6 @@ def import_coco_func(task, socket, dataset, coco_json): else: task.info(f"Annotation already exists (i:{image_id}, c:{category_id})") - task.set_progress(100) + task.set_progress(100, socket=socket) diff --git a/client/src/components/tasks/Task.vue b/client/src/components/tasks/Task.vue index d605ecca..ff8a0244 100644 --- a/client/src/components/tasks/Task.vue +++ b/client/src/components/tasks/Task.vue @@ -97,7 +97,12 @@ export default { } }, watch: { - showLogs: "getLogs" + showLogs: "getLogs", + completed() { + if (this.showLogs) { + this.getLogs() + } + } }, computed: { warnings() { diff --git a/client/src/views/Dataset.vue b/client/src/views/Dataset.vue index 106d1388..8e6711c0 100755 --- a/client/src/views/Dataset.vue +++ b/client/src/views/Dataset.vue @@ -74,8 +74,7 @@