MCPcopy Create free account
hub / github.com/aaPanel/BaoTa / handle_service

Method handle_service

mod/project/python/serviceMod.py:740–754  ·  view source on GitHub ↗
(get)

Source from the content-addressed store, hash-verified

738
739 @staticmethod
740 def handle_service(get):
741 try:
742 project_name = get.project_name.strip()
743 sid = get.sid.strip()
744 action = get.option.strip()
745 except:
746 return json_response(False, '参数错误')
747 s_mgr = ServiceManager.new_mgr(project_name)
748 if isinstance(s_mgr, str):
749 return json_response(False, s_mgr)
750 res = s_mgr.handle_service(sid, action)
751 if isinstance(res, str):
752 return json_response(False, res)
753
754 return json_response(True, msg="操作成功")
755
756 @staticmethod
757 def get_service_log(get):

Callers

nothing calls this directly

Calls 2

json_responseFunction · 0.90
new_mgrMethod · 0.80

Tested by

no test coverage detected