You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Below is my code but it not run send_messages function. Complier not raise any exceptions. Please.....
`class AsyncNotificationViewSet(ViewSet):
FCM_SENDER_ID = <FCM_SENDER_ID >
FCM_API_KEY = <FCM_API_KEY >
fcm = FCM(FCM_SENDER_ID, FCM_API_KEY)
async def send_message(self):
print(self.fcm.pool.connections)
message = Message(
device_token=<device_token>,
notification={
"title": "Hello from Firebase",
"body": "This is notification",
"sound": "default"
}
)
await self.fcm.send_message(message)
print(self.fcm.pool.connections)
async def cron(self, request):
try:
loop = asyncio.get_event_loop()
send_messages = [self.send_message() for _ in range(1)]
res = await asyncio.wait(send_messages)
return success_response()
except Exception as e:
print(e)
return HttpResponse(str(e))`
The text was updated successfully, but these errors were encountered:
Below is my code but it not run send_messages function. Complier not raise any exceptions. Please.....
`class AsyncNotificationViewSet(ViewSet):
FCM_SENDER_ID = <FCM_SENDER_ID >
FCM_API_KEY = <FCM_API_KEY >
fcm = FCM(FCM_SENDER_ID, FCM_API_KEY)
The text was updated successfully, but these errors were encountered: