فهرست منبع

数据库更新逻辑

rambo 7 ماه پیش
والد
کامیت
deb7f366f0
1فایلهای تغییر یافته به همراه3 افزوده شده و 3 حذف شده
  1. 3 3
      python/mcu/capture/module_watch_dog.py

+ 3 - 3
python/mcu/capture/module_watch_dog.py

@@ -164,9 +164,6 @@ class FileEventHandler(FileSystemEventHandler, metaclass=SingletonType):
                     loop.run_until_complete(self.sendCallback(file_path))
                     loop.close()
                     return
-                updateImageRaw(
-                    create_time, file_path, self.goods_art_no, self.image_index
-                )
                 loop = asyncio.new_event_loop()
                 asyncio.set_event_loop(loop)
                 loop.run_until_complete(
@@ -178,6 +175,9 @@ class FileEventHandler(FileSystemEventHandler, metaclass=SingletonType):
                     )
                 )
                 loop.close()
+                updateImageRaw(
+                    create_time, file_path, self.goods_art_no, self.image_index
+                )
             except BaseException as e:
                 print("获取文件create_time失败", e)
                 self.send_log("获取文件处理失败{}".format(e))