mom上传图片
This commit is contained in:
@@ -647,4 +647,5 @@ def start_loop():
|
|||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
# pyinstaller main_cy.py --add-data config_cy.ini:.
|
# pyinstaller main_cy.py --add-data config_cy.ini:.
|
||||||
|
# 冲压
|
||||||
start_loop()
|
start_loop()
|
||||||
|
@@ -458,4 +458,5 @@ def start_loop():
|
|||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
# pyinstaller main_pb.py --add-data config_pb.ini:.
|
# pyinstaller main_pb.py --add-data config_pb.ini:.
|
||||||
|
# 平板
|
||||||
start_loop()
|
start_loop()
|
||||||
|
@@ -6,7 +6,9 @@ from watchdog.observers import Observer
|
|||||||
from watchdog.events import FileSystemEventHandler
|
from watchdog.events import FileSystemEventHandler
|
||||||
|
|
||||||
# 加载配置
|
# 加载配置
|
||||||
with open("config_mom.json", encoding="utf-8") as f:
|
current_dir = os.path.dirname(os.path.abspath(__file__))
|
||||||
|
config_path = os.path.join(current_dir, 'config_mom.json')
|
||||||
|
with open(config_path, encoding="utf-8") as f:
|
||||||
config = json.load(f)
|
config = json.load(f)
|
||||||
|
|
||||||
MOM_UPLOAD_URL = f"{config['mom_prefix']}/cams-service/openapi/hotwater/file/upload"
|
MOM_UPLOAD_URL = f"{config['mom_prefix']}/cams-service/openapi/hotwater/file/upload"
|
||||||
@@ -49,6 +51,8 @@ class ImageHandler(FileSystemEventHandler):
|
|||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
# pyinstaller upload_pict_mom.py --add-data config_mom.json:.
|
||||||
|
# 给mom上传图片
|
||||||
for folder in WATCH_FOLDERS:
|
for folder in WATCH_FOLDERS:
|
||||||
os.makedirs(folder, exist_ok=True)
|
os.makedirs(folder, exist_ok=True)
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user