d931d082 by 周伟奇

fix folder bug

1 parent 76581bb1
......@@ -335,13 +335,15 @@ class Command(BaseCommand, LoggerMixin):
self.folder_log.info('{0} [file end] [path={1}]'.format(self.log_base, path))
else:
self.folder_log.info('{0} [path is dir] [path={1}]'.format(self.log_base, input_dir))
shutil.move(path, failed_output_dir)
failed_path = os.path.join(failed_output_dir, '{0}_{1}'.format(time.time(), name))
shutil.move(path, failed_path)
except Exception as e:
try:
path = os.path.join(input_dir, name)
self.folder_log.error('{0} [file error] [path={1}] [error={2}]'.format(self.log_base, path,
traceback.format_exc()))
shutil.move(path, failed_output_dir)
failed_path = os.path.join(failed_output_dir, '{0}_{1}'.format(time.time(), name))
shutil.move(path, failed_path)
continue
except Exception as e:
self.folder_log.error('{0} [file error] [error={1}]'.format(
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!