feat(event): add single-thread event publisher with retry and cleanup
This commit is contained in:
@@ -96,6 +96,15 @@ class EventStore:
|
||||
attempt_count=row["attempt_count"],
|
||||
)
|
||||
|
||||
def get(self, event_id: str) -> Optional[OutboundEvent]:
|
||||
row = self._connection().execute(
|
||||
"SELECT id, event_type, payload, status, attempt_count FROM outbound_events WHERE id = ?",
|
||||
(event_id,),
|
||||
).fetchone()
|
||||
if row is None:
|
||||
return None
|
||||
return self._row_to_event(row)
|
||||
|
||||
def mark_delivered(self, event_id: str) -> None:
|
||||
now = self._now().isoformat()
|
||||
with self._connection() as conn:
|
||||
|
||||
Reference in New Issue
Block a user