Unverified Commit 9f7caffa authored by Jakob Görgen's avatar Jakob Görgen
Browse files

symphony/client: removed prints

parent fc93beba
...@@ -74,7 +74,7 @@ class BaseClient: ...@@ -74,7 +74,7 @@ class BaseClient:
async with session.post( async with session.post(
url=self.build_url(url), data=data, **kwargs url=self.build_url(url), data=data, **kwargs
) as resp: # TODO: handel connection error ) as resp: # TODO: handel connection error
print(await resp.text()) # print(await resp.text())
resp.raise_for_status() # TODO: handel gracefully resp.raise_for_status() # TODO: handel gracefully
yield resp yield resp
...@@ -90,7 +90,7 @@ class BaseClient: ...@@ -90,7 +90,7 @@ class BaseClient:
async with session.put( async with session.put(
url=self.build_url(url), data=data, **kwargs url=self.build_url(url), data=data, **kwargs
) as resp: # TODO: handel connection error ) as resp: # TODO: handel connection error
print(await resp.text()) # print(await resp.text())
resp.raise_for_status() # TODO: handel gracefully resp.raise_for_status() # TODO: handel gracefully
yield resp yield resp
...@@ -102,7 +102,7 @@ class BaseClient: ...@@ -102,7 +102,7 @@ class BaseClient:
async with session.patch( async with session.patch(
url=self.build_url(url), data=data, **kwargs url=self.build_url(url), data=data, **kwargs
) as resp: # TODO: handel connection error ) as resp: # TODO: handel connection error
print(await resp.text()) # print(await resp.text())
resp.raise_for_status() # TODO: handel gracefully resp.raise_for_status() # TODO: handel gracefully
yield resp yield resp
...@@ -114,7 +114,7 @@ class BaseClient: ...@@ -114,7 +114,7 @@ class BaseClient:
async with session.get( async with session.get(
url=self.build_url(url), data=data, **kwargs url=self.build_url(url), data=data, **kwargs
) as resp: # TODO: handel connection error ) as resp: # TODO: handel connection error
print(await resp.text()) # print(await resp.text())
resp.raise_for_status() # TODO: handel gracefully resp.raise_for_status() # TODO: handel gracefully
yield resp yield resp
...@@ -122,7 +122,7 @@ class BaseClient: ...@@ -122,7 +122,7 @@ class BaseClient:
async def delete(self, url: str, **kwargs: typing.Any) -> typing.AsyncIterator[aiohttp.ClientResponse]: async def delete(self, url: str, **kwargs: typing.Any) -> typing.AsyncIterator[aiohttp.ClientResponse]:
async with self.session() as session: async with self.session() as session:
async with session.delete(url=self.build_url(url), **kwargs) as resp: # TODO: handel connection error async with session.delete(url=self.build_url(url), **kwargs) as resp: # TODO: handel connection error
print(await resp.text()) # print(await resp.text())
resp.raise_for_status() # TODO: handel gracefully resp.raise_for_status() # TODO: handel gracefully
yield resp yield resp
...@@ -337,14 +337,15 @@ class SimBricksClient: ...@@ -337,14 +337,15 @@ class SimBricksClient:
if not last_run or (len(last_run["output"]) != len(run["output"]) and len(run["output"]) != 0): if not last_run or (len(last_run["output"]) != len(run["output"]) and len(run["output"]) != 0):
prev_len = len(last_run["output"]) if last_run else 0 prev_len = len(last_run["output"]) if last_run else 0
console.log(run["output"][prev_len:]) # console.log(run["output"][prev_len:])
console.log(run["output"]) # TODO: FIXME
# did we finish? # did we finish?
if run["state"] != "pending" and run["state"] != "running": if run["state"] != "pending" and run["state"] != "running":
break break
last_run = run last_run = run
await asyncio.sleep(2) await asyncio.sleep(15)
console.log("Run {run_id} finished") console.log("Run {run_id} finished")
......
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