81bd9519 by 周伟奇

add dir log

1 parent c3261b19
...@@ -165,7 +165,6 @@ class Command(BaseCommand, LoggerMixin): ...@@ -165,7 +165,6 @@ class Command(BaseCommand, LoggerMixin):
165 def folder_process(self, input_dir, classify): 165 def folder_process(self, input_dir, classify):
166 while not os.path.isdir(input_dir): 166 while not os.path.isdir(input_dir):
167 self.folder_log.info('{0} [input dir is not dir] [input_dir={1}]'.format(self.log_base, input_dir)) 167 self.folder_log.info('{0} [input dir is not dir] [input_dir={1}]'.format(self.log_base, input_dir))
168 print(self.switch)
169 if self.switch: 168 if self.switch:
170 time.sleep(self.sleep_time) 169 time.sleep(self.sleep_time)
171 continue 170 continue
...@@ -202,6 +201,8 @@ class Command(BaseCommand, LoggerMixin): ...@@ -202,6 +201,8 @@ class Command(BaseCommand, LoggerMixin):
202 else: 201 else:
203 self.img_process(name, path, classify, wb_output_dir, img_output_dir, pdf_output_dir) 202 self.img_process(name, path, classify, wb_output_dir, img_output_dir, pdf_output_dir)
204 self.folder_log.info('{0} [file end] [path={1}]'.format(self.log_base, path)) 203 self.folder_log.info('{0} [file end] [path={1}]'.format(self.log_base, path))
204 else:
205 self.folder_log.info('{0} [path is dir] [path={1}]'.format(self.log_base, input_dir))
205 except Exception as e: 206 except Exception as e:
206 try: 207 try:
207 path = os.path.join(input_dir, name) 208 path = os.path.join(input_dir, name)
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!