Update debug logs with latest known and upstream events
Updated debug logs in the `start_loop` function to include the latest known event for a tracking number and the latest upstream event with their respective timestamps. This provides more detailed information for debugging purposes.
This commit is contained in:
parent
33721e4939
commit
053ae780e1
1 changed files with 1 additions and 1 deletions
|
@ -223,7 +223,7 @@ def start_loop(db: sqlite3.Connection, api: KeyDelivery) -> Never:
|
|||
|
||||
events = sorted(all_events["data"]["items"], key=lambda x: x["time"], reverse=True)
|
||||
|
||||
logging.debug(f"Latest known event for {tracking_number}: {latest_known_event[3]}")
|
||||
logging.debug(f"Latest known event for {tracking_number}: {latest_known_event[3]} - {latest_known_event[2]}")
|
||||
logging.debug(f"Latest upstream event for {tracking_number}: {events[0]['context']} - {events[0]['time']}")
|
||||
|
||||
for event in events:
|
||||
|
|
Loading…
Reference in a new issue