def test_start_hello(self): # start a service over messaging self._start_container() cc_client = ContainerAgentClient(to_name=self.container.name) p = cc_client.spawn_process('hello', 'ion.service.examples.hello_service', 'HelloService')
def _action_spawn_process(self, action_kwargs): cc_agent_name = action_kwargs["cc_agent"] proc_name = action_kwargs["proc_name"] module = action_kwargs["module"] cls = action_kwargs["cls"] config = action_kwargs["config"] target_cc_agent = ContainerAgentClient(to_name=cc_agent_name) proc_id = target_cc_agent.spawn_process(proc_name, module, cls, config) return proc_id