"test/git@developer.sourcefind.cn:hehl2/torchaudio.git" did not exist on "131e48b665d6c1aef8a48fb0e0ecaed3dd78e63b"
Unverified Commit 5e6d1435 authored by Jakob Görgen's avatar Jakob Görgen
Browse files

symphony/client: use resource_group when creating runner

parent 950a3bb0
...@@ -425,8 +425,9 @@ class RunnerClient: ...@@ -425,8 +425,9 @@ class RunnerClient:
async with self._ns_client.get(url=self._build_prefix(url=url), data=data, **kwargs) as resp: async with self._ns_client.get(url=self._build_prefix(url=url), data=data, **kwargs) as resp:
yield resp yield resp
async def create_runner(self, label: str, tags: list[str]) -> dict: async def create_runner(self, resource_group_id: int, label: str, tags: list[str]) -> dict:
obj = {"label": label, "tags": list(map(lambda t: {"label": t, "runner_id": None}, tags))} tags_obj = list(map(lambda t: {"label": t}, tags))
obj = {"resource_group_id": resource_group_id, "label": label, "tags": tags_obj}
async with self._ns_client.post(url=f"/runners", json=obj) as resp: async with self._ns_client.post(url=f"/runners", json=obj) as resp:
return await resp.json() return await resp.json()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment