From aa8a0ba3a86ff5dbbdfcd68c72a5e70e1c52e877 Mon Sep 17 00:00:00 2001
From: wu_xinjun <bent20140204@outlook.com>
Date: 星期二, 07 六月 2022 10:50:50 +0800
Subject: [PATCH] optimize for mq
---
src/Client.py | 84 +++++++++++++++++++++---------------------
1 files changed, 42 insertions(+), 42 deletions(-)
diff --git a/src/Client.py b/src/Client.py
index 4bb0efb..6fa9ebd 100644
--- a/src/Client.py
+++ b/src/Client.py
@@ -1,49 +1,49 @@
-import signal
-import os, sys
+# import signal
+# import os, sys
-from .engine.AcquisitionMain import AcquisitionMain
-from .engine.AcquisitionMain import Config
+# from .engine.AcquisitionMain import AcquisitionMain
+# from .engine.AcquisitionMain import Config
-def quit(signum, frame):
- print('You choose to stop me.')
- sys.exit()
+# def quit(signum, frame):
+# print('You choose to stop me.')
+# sys.exit()
-if __name__ == '__main__':
- def help():
- print("Usage: Client.py [MQhost] [MQuser] [MQpassword] [QUEUEname] [DEVICEname] [SERVERhost] [MICROWAVEhost]")
- print("EXAMPLE: Client.py 172.17.17.206 chai password123 aerial_rpc pod1 http://172.17.17.206/api 192.168.2.65")
- exit(1)
+# if __name__ == '__main__':
+# def help():
+# print("Usage: Client.py [MQhost] [MQuser] [MQpassword] [QUEUEname] [DEVICEname] [SERVERhost] [MICROWAVEhost]")
+# print("EXAMPLE: Client.py 172.17.17.206 chai password123 aerial_rpc pod1 http://172.17.17.206/api 192.168.2.65")
+# exit(1)
- if len(sys.argv) != 8:
- help()
- try:
- MQhost = str(sys.argv[1])
- MQuser = str(sys.argv[2])
- MQpassword = str(sys.argv[3])
- QUEUEname = str(sys.argv[4])
- DEVICEname = str(sys.argv[5])
- SERVERhost = str(sys.argv[6])
- MICROWAVEhost = str(sys.argv[7])
+# if len(sys.argv) != 8:
+# help()
+# try:
+# MQhost = str(sys.argv[1])
+# MQuser = str(sys.argv[2])
+# MQpassword = str(sys.argv[3])
+# QUEUEname = str(sys.argv[4])
+# DEVICEname = str(sys.argv[5])
+# SERVERhost = str(sys.argv[6])
+# MICROWAVEhost = str(sys.argv[7])
- except Exception as e:
- print(e)
- help()
+# except Exception as e:
+# print(e)
+# help()
- print("Start AcquisitionMain")
- signal.signal(signal.SIGINT, quit)
- signal.signal(signal.SIGTERM, quit)
- # client = AcquisitionMain('192.168.3.54', 'chai',
- # 'password123', 'aerial_rpc', 'pod1', 'http://192.168.3.54:5000/api', 10)
- config_dir = os.path.join(__file__, "..", "config.json" )
- config_path = os.path.abspath(config_dir)
- config = Config(config_path)
- client = AcquisitionMain(MQhost,
- MQuser,
- MQpassword,
- QUEUEname,
- DEVICEname,
- SERVERhost,
- MICROWAVEhost, # udp server host, 192.168.2.65 for production
- config)
- client.start()
+# print("Start AcquisitionMain")
+# signal.signal(signal.SIGINT, quit)
+# signal.signal(signal.SIGTERM, quit)
+# # client = AcquisitionMain('192.168.3.54', 'chai',
+# # 'password123', 'aerial_rpc', 'pod1', 'http://192.168.3.54:5000/api', 10)
+# config_dir = os.path.join(__file__, "..", "config.json" )
+# config_path = os.path.abspath(config_dir)
+# config = Config(config_path)
+# client = AcquisitionMain(MQhost,
+# MQuser,
+# MQpassword,
+# QUEUEname,
+# DEVICEname,
+# SERVERhost,
+# MICROWAVEhost, # udp server host, 192.168.2.65 for production
+# config)
+# client.start()
--
Gitblit v1.9.1