File tree Expand file tree Collapse file tree
services/apps/mailing_list_integration/src/crowdmail/database Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -210,7 +210,18 @@ async def get_list_integration_info(list_id: str) -> dict | None:
210210 return await fetchrow (sql_query , (list_id ,))
211211
212212
213+ @retry (
214+ stop = stop_after_attempt (3 ),
215+ wait = wait_fixed (1 ),
216+ reraise = True ,
217+ )
213218async def update_processed_heads (list_id : str , heads : dict ) -> None :
219+ # Retried on any failure: activities from this flush are already queued
220+ # (DB rows written, Kafka published) by the time this runs, so a transient
221+ # failure here must not fail the whole run — that would leave the head
222+ # un-advanced and the next attempt re-reading + re-queueing the same
223+ # commits as duplicate Kafka work for the same resultIds.
224+ #
214225 # Merge (||) instead of replace: if stuck-reclaim ever lets two workers
215226 # process the same list concurrently, a slower worker's flush only
216227 # touches the shard keys it actually recomputed, instead of overwriting
You can’t perform that action at this time.
0 commit comments