|
@@ -82,11 +82,16 @@ class Interface:
|
|
|
count += 1
|
|
|
logger.info("PROGRESS", extra={'event_type': EventType.PROGRESS, 'total': files_in_total, 'current': count})
|
|
|
try:
|
|
|
+ real_path = os.path.dirname(path)
|
|
|
+ real_path = os.path.relpath(real_path, self.input)
|
|
|
+ output = os.path.join(self.result, real_path)
|
|
|
+ if not os.path.exists(output):
|
|
|
+ os.makedirs(output)
|
|
|
+
|
|
|
params = copy.deepcopy(self.params)
|
|
|
- params.set_path(path)
|
|
|
+ params.set_path(path, output)
|
|
|
if not tools.processor(params):
|
|
|
- real_path = os.path.relpath(path, self.input)
|
|
|
- shutil.copy(path, os.path.join(self.result, real_path))
|
|
|
+ shutil.copy(path, os.path.join(output, os.path.basename(path)))
|
|
|
|
|
|
except Exception as e:
|
|
|
logger.info(e, extra={'event_type': EventType.TASK_CRASHED, 'traceback': traceback.format_exc()})
|