MCPcopy Create free account
hub / github.com/runhey/OnmyojiAutoScript / stop

Method stop

module/server/script_process.py:47–57  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

45
46
47 async def stop(self):
48 self.state = ScriptState.INACTIVE
49 await self.broadcast_state({"state": self.state})
50 if self._process is None:
51 logger.warning(f'Script {self.config_name} process is removed')
52 return
53 if not self._process.is_alive():
54 logger.warning(f'Script {self.config_name} is not running')
55 return
56 self._process.terminate()
57 self._process = None
58
59 async def coroutine_broadcast_state(self):
60 try:

Callers 5

startMethod · 0.95
minitouch_initMethod · 0.45
push_data_handleMethod · 0.45
script_stopFunction · 0.45
websocket_endpointFunction · 0.45

Calls 1

broadcast_stateMethod · 0.80

Tested by

no test coverage detected