This commit is contained in:
@@ -128,7 +128,9 @@ class FirestoreNotificationBackend:
|
|||||||
return result
|
return result
|
||||||
|
|
||||||
async def mark_as_notified(
|
async def mark_as_notified(
|
||||||
self, phone_number: str, notification_ids: list[str] # noqa: ARG002
|
self,
|
||||||
|
phone_number: str, # noqa: ARG002
|
||||||
|
notification_ids: list[str], # noqa: ARG002
|
||||||
) -> bool:
|
) -> bool:
|
||||||
"""No-op — the agent is not the delivery mechanism."""
|
"""No-op — the agent is not the delivery mechanism."""
|
||||||
return True
|
return True
|
||||||
@@ -180,9 +182,7 @@ class RedisNotificationBackend:
|
|||||||
return []
|
return []
|
||||||
|
|
||||||
data = json.loads(raw)
|
data = json.loads(raw)
|
||||||
all_notifications: list[dict[str, Any]] = data.get(
|
all_notifications: list[dict[str, Any]] = data.get("notificaciones", [])
|
||||||
"notificaciones", []
|
|
||||||
)
|
|
||||||
|
|
||||||
if not all_notifications:
|
if not all_notifications:
|
||||||
logger.info(
|
logger.info(
|
||||||
@@ -214,8 +214,7 @@ class RedisNotificationBackend:
|
|||||||
result = recent[: self._max_to_notify]
|
result = recent[: self._max_to_notify]
|
||||||
|
|
||||||
logger.info(
|
logger.info(
|
||||||
"Found %d recent notifications for phone: %s "
|
"Found %d recent notifications for phone: %s (returning top %d)",
|
||||||
"(returning top %d)",
|
|
||||||
len(recent),
|
len(recent),
|
||||||
phone_number,
|
phone_number,
|
||||||
len(result),
|
len(result),
|
||||||
@@ -231,7 +230,9 @@ class RedisNotificationBackend:
|
|||||||
return result
|
return result
|
||||||
|
|
||||||
async def mark_as_notified(
|
async def mark_as_notified(
|
||||||
self, phone_number: str, notification_ids: list[str] # noqa: ARG002
|
self,
|
||||||
|
phone_number: str, # noqa: ARG002
|
||||||
|
notification_ids: list[str], # noqa: ARG002
|
||||||
) -> bool:
|
) -> bool:
|
||||||
"""No-op — the agent is not the delivery mechanism."""
|
"""No-op — the agent is not the delivery mechanism."""
|
||||||
return True
|
return True
|
||||||
|
|||||||
Reference in New Issue
Block a user