优化代码
This commit is contained in:
parent
ccb5e315fd
commit
e42a29ab11
|
|
@ -1,3 +1,3 @@
|
||||||
cd src
|
cd src
|
||||||
pyinstaller --onefile --add-data "install/Common.py:install" --add-data "datas/init.sql:datas" .\install\InstallMariaDB.py
|
pyinstaller --onefile --add-data "install/Common.py:install" --add-data "datas/init.sql:datas" .\install\InstallMariaDB.py
|
||||||
pyinstaller --onefile --add-data "install/Common.py:install" --add-data "datas/nssm.exe:datas" --add-data "datas/electromagnetic.jar:datas" .\install\InstallMariaDB.py
|
pyinstaller --onefile --add-data "install/Common.py:install" --add-data "datas/nssm.exe:datas" --add-data "datas/electromagnetic.jar:datas" .\install\InstallComacDB.py
|
||||||
|
|
|
||||||
|
|
@ -101,8 +101,10 @@ class InstallComacDb:
|
||||||
logger.info("清理历史服务")
|
logger.info("清理历史服务")
|
||||||
stop_command = ["sc", "stop", self.service_name]
|
stop_command = ["sc", "stop", self.service_name]
|
||||||
delete_command = ["sc", "delete", self.service_name]
|
delete_command = ["sc", "delete", self.service_name]
|
||||||
subprocess.run(stop_command, capture_output=True, text=True)
|
res1 = subprocess.run(stop_command, capture_output=True, text=True)
|
||||||
subprocess.run(delete_command, capture_output=True, text=True)
|
logger.info(res1.stdout)
|
||||||
|
res2 = subprocess.run(delete_command, capture_output=True, text=True)
|
||||||
|
logger.info(res2.stdout)
|
||||||
time.sleep(5)
|
time.sleep(5)
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue