Skip to content

Commit

Permalink
fix: test cases
Browse files Browse the repository at this point in the history
Signed-off-by: s0nicboOm <i.kushalbatra@gmail.com>
  • Loading branch information
s0nicboOm committed Sep 12, 2023
1 parent b03f9f9 commit 965c9c5
Show file tree
Hide file tree
Showing 4 changed files with 221 additions and 176 deletions.
4 changes: 2 additions & 2 deletions numalogic/registry/redis_registry.py
Original file line number Diff line number Diff line change
Expand Up @@ -385,6 +385,8 @@ def save_multiple(
metadata: additional metadata surrounding the artifact that needs to be saved.
"""
dict_model_ver = {}
if len(list_artifacts) != len(list_dkeys):
raise IndexError("artifact list and dkeys list should have same length!")
try:
with self.client.pipeline(transaction=self.transactional) as pipe:
pipe.multi()
Expand All @@ -405,7 +407,5 @@ def save_multiple(
_LOGGER.info("Successfully saved all the artifacts with: %s", dict_model_ver)
except RedisError as err:
raise RedisRegistryError(f"{err.__class__.__name__} raised") from err
except IndexError as index_err:
raise RedisRegistryError(f"{index_err.__class__.__name__} raised") from index_err
else:
return dict_model_ver
Loading

0 comments on commit 965c9c5

Please sign in to comment.