Shakti Tripathi
unread,Dec 22, 2023, 7:04:36 PM12/22/23Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Firebase Google Group
from google.cloud import firestore
import firebase_admin
from firebase_admin import credentials
FIREBASE_CREDENTIALS_FILE = '/<my path to credentials>'
FIREBASE_CREDENTIALS = credentials.Certificate(FIREBASE_CREDENTIALS_FILE)
firebase_admin.initialize_app(FIREBASE_CREDENTIALS, name='local')
db = firestore.Client()
collection = db.collection('chat_sessions')
chat_session_id='<session id>'
new_session_ref = collection.document()
new_session_data = {
'participantIds': [1, 2],
'createdAt': firestore.SERVER_TIMESTAMP
}
new_session_ref.set(new_session_data)
This is failing with 504 Deadline Exceeded error from past 2 days.
Before that, this same code was working 100%
Can anyone please help me out here ASAP!