Skip to content

Commit 21da105

Browse files
committed
fix: [#64073] immediately retry events on unsilence
1 parent c871910 commit 21da105

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

backend/mora/graphapi/versions/latest/mutators.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
# SPDX-License-Identifier: MPL-2.0
33
import asyncio
44
import logging
5+
from datetime import datetime
56
from textwrap import dedent
67
from typing import Annotated
78
from typing import Any
@@ -1930,7 +1931,16 @@ async def event_unsilence(
19301931

19311932
# coverage: pause
19321933
session: AsyncSession = info.context["session"]
1933-
await session.execute(update(db.Event).where(*clauses).values(silenced=False))
1934+
await session.execute(
1935+
update(db.Event)
1936+
.where(*clauses)
1937+
.values(
1938+
silenced=False,
1939+
# Update last_tried to override back-off and retry event
1940+
# immediately.
1941+
last_tried=datetime(1970, 1, 1),
1942+
)
1943+
)
19341944
return True
19351945
# coverage: unpause
19361946

0 commit comments

Comments
 (0)