Selaa lähdekoodia

Merge branch 'dev-python'

rambo 7 kuukautta sitten
vanhempi
commit
7c87b3cc98
2 muutettua tiedostoa jossa 2 lisäystä ja 2 poistoa
  1. 1 1
      python/api.py
  2. 1 1
      python/mcu/capture/module_watch_dog.py

+ 1 - 1
python/api.py

@@ -268,7 +268,7 @@ async def handle_detail(request: Request, params: HandlerDetail):
     goods_art_no_array = params.goods_art_no
     handler_result = []
     handler_result_folder = ""
-    if params.excel_path != "" or params.excel_path != None:
+    if params.excel_path != "" and params.excel_path != None:
         return fromExcelHandler(params)
     for goods_art_no in goods_art_no_array:
         try:

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

@@ -118,7 +118,7 @@ class FileEventHandler(FileSystemEventHandler, metaclass=SingletonType):
         crud.read()
 
     async def sendCallback(self, file_path):
-        await asyncio.sleep(0.01)
+        await asyncio.sleep(2)
         self.mcu.msg_type = "run_mcu_single"
         print("货号不存在,监听不写入", self.mcu.msg_type)
         self.mcu.sendSocketMessage(