From f40b630059eb39413f7c5a48158af0d3245a0c60 Mon Sep 17 00:00:00 2001 From: Akhil Narang Date: Mon, 17 Jul 2023 21:24:05 +0530 Subject: [PATCH] refactor(firebase): use `send_each()` instead of `send_all()` The latter is now deprecated: https://github.com/firebase/firebase-admin-python/pull/706 Signed-off-by: Akhil Narang --- app/cron.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/cron.py b/app/cron.py index 1ff2479..ad6354b 100644 --- a/app/cron.py +++ b/app/cron.py @@ -72,7 +72,7 @@ async def fcm_notification_cron(ctx: dict) -> None: if messages: app_name = ctx.get("job_id", uuid.uuid4()) app = initialize_app(name=app_name, credential=credentials.Certificate(settings.GOOGLE_APPLICATION_CREDENTIALS)) - messaging.send_all(messages=messages, app=app) + messaging.send_each(messages=messages, app=app) delete_app(app) logging.info("Sent notification") else: