You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
hbyd_ueba/bin/stop.py

22 lines
528 B

6 months ago
# -*-coding:utf-8 -*-
import json
import os
from appManager.module.global_api import ComponentHelper
DIR_PATH = os.path.split(os.path.realpath(__file__))[0]
BASE_PATH = os.path.split(DIR_PATH)[0]
# 组件停止脚本
def stop():
with open(os.path.join(BASE_PATH, "package.json"), "r+") as f:
pkgConfig = json.load(f)
app_name = pkgConfig["name"]
componentHelper = ComponentHelper(app_name)
# 调用组件管理接口停用任务
componentHelper.stop_task()
if __name__ == '__main__':
stop()