MCPcopy Create free account
hub / github.com/It4innovations/hyperqueue / handle_command

Method handle_command

tests/autoalloc/mock/manager.py:141–149  ·  view source on GitHub ↗
(self, input: CommandInput)

Source from the content-addressed store, hash-verified

139 self.deleted_jobs = set()
140
141 async def handle_command(self, input: CommandInput) -> CommandOutput:
142 cmd_type = self.adapter.parse_command_type(input)
143 if cmd_type == "submit":
144 return await self.handle_cli_submit(input)
145 elif cmd_type == "status":
146 return await self.handle_cli_status(input)
147 elif cmd_type == "delete":
148 return await self.handle_cli_delete(input)
149 raise Exception(f"Input command {input} not handled")
150
151 async def handle_cli_submit(self, input: CommandInput) -> CommandOutput:
152 job_id = await self.handle_submit()

Callers 1

handle_requestMethod · 0.80

Calls 4

handle_cli_submitMethod · 0.95
handle_cli_statusMethod · 0.95
handle_cli_deleteMethod · 0.95
parse_command_typeMethod · 0.45

Tested by

no test coverage detected