Skip to content

Commit 6902ab0

Browse files
committed
Add timer back to exception block to capture failures
1 parent f88d7f9 commit 6902ab0

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

tron/serialize/runstate/dynamodb_state_store.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -381,6 +381,10 @@ def __setitem__(self, key: str, value: Tuple[bytes, str]) -> None:
381381
self.client.transact_write_items(TransactItems=items)
382382
items = []
383383
except Exception as e:
384+
timer(
385+
name="tron.dynamodb.setitem",
386+
delta=time.time() - start,
387+
)
384388
log.error(f"Failed to save partition for key: {key}, error: {repr(e)}")
385389
raise e
386390
timer(

0 commit comments

Comments
 (0)