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

Method ws_err_exit

mod/project/nodejs/base.py:983–993  ·  view source on GitHub ↗

@name websocket错误退出函数

(self, status: bool = True,
                    msg: str = "",
                    data: any = None,
                    timestamp: int = None,
                    code: int = 0,
                    args: any = None)

Source from the content-addressed store, hash-verified

981 # 2024/7/12 下午12:40 websocket错误退出函数
982 # 2026/4/8 备注:关闭ws并不会结束ws处理线程,此处写法或用法不合理
983 def ws_err_exit(self, status: bool = True,
984 msg: str = "",
985 data: any = None,
986 timestamp: int = None,
987 code: int = 0,
988 args: any = None):
989 '''
990 @name websocket错误退出函数
991 '''
992 self.get._ws.send(json.dumps(self.wsResult(status, msg, data, timestamp, code, args)))
993 self.get._ws.close()
994
995 # 2024/7/12 下午5:45 删除node项目
996 def remove_project(self, get):

Callers 6

check_node_versionMethod · 0.95
install_packageMethod · 0.80
create_projectMethod · 0.80
createMethod · 0.80
create_projectMethod · 0.80
create_projectMethod · 0.80

Calls 4

wsResultMethod · 0.95
sendMethod · 0.45
dumpsMethod · 0.45
closeMethod · 0.45

Tested by

no test coverage detected