Skip to content

Commit

Permalink
ISSUE #78
Browse files Browse the repository at this point in the history
  • Loading branch information
vladyslav-fenchak committed Feb 9, 2022
1 parent a0f52ea commit 8bef55b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 2 additions & 1 deletion minos/api_gateway/discovery/database/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,8 @@ async def get_all(self) -> list:

async def set_data(self, key: str, data: dict):
try:
await self.redis.set(key, json.dumps(data))
res = await self.redis.set(key, json.dumps(data))
return res
except Exception as e: # pragma: no cover
raise e

Expand Down
4 changes: 3 additions & 1 deletion minos/api_gateway/discovery/domain/microservice.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,9 @@ async def save(self, db_client) -> None:
log.info("--------SAVE----------")
log.info(microservice_key)
log.info(microservice_value)
await db_client.set_data(microservice_key, microservice_value)
res = await db_client.set_data(microservice_key, microservice_value)
log.info("REDIS RES")
log.info(res)
for endpoint_key in microservice_value["endpoints"]:
await db_client.set_data(endpoint_key, microservice_key)
log.info("--------END SAVE----------")
Expand Down

0 comments on commit 8bef55b

Please sign in to comment.