Skip to content

Commit

Permalink
removing the try/except since it was added in a separate pr
Browse files Browse the repository at this point in the history
  • Loading branch information
EmanElsaban committed Jan 9, 2025
1 parent 5808232 commit 9adc64e
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions tron/serialize/runstate/dynamodb_state_store.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,13 +169,7 @@ def _merge_items(self, first_items, remaining_items, read_json=False) -> dict:
raw_items[key] += bytes(val["val"]["B"])
if read_json:
for json_val in item:
try:
json_items[key] = json_val["json_val"]["S"]
except Exception:
log.exception(f"json_val not found for key {key}")
# fallback to pickled data if json_val fails to exist for any key
# TODO: it would be nice if we can read the pickled data only for this failed key instead of all keys
read_json = False
json_items[key] = json_val["json_val"]["S"]
if read_json:
try:
log.info("read_json is enabled. Deserializing JSON items to restore them instead of pickled data.")
Expand Down

0 comments on commit 9adc64e

Please sign in to comment.