Company logo
  • Empleos
  • Bootcamp
  • Acerca de nosotros
  • Para profesionales
    • Inicio
    • Empleos
    • Cursos y retos
    • Preguntas
    • Profesores
    • Bootcamp
  • Para empresas
    • Inicio
    • Nuestro proceso
    • Planes
    • Pruebas
    • Nómina
    • Blog
    • Calculadora

0

57
Vistas
Firestore offline cache data not fully synced to cloud

I'm doing around 100 writes to Firestore offline. But after connecting to the internet I see some of my data is missing in the cloud. There are no errors in the writing process though. If I do the same thing online, all the data is synced to the cloud.

Below is the code I'm trying in offline mode. Each function has around 10 iterates. There are 10 functions running one after the other.

const updateCities = async (cities) => {
  for (const city of cities) {
    try {
      const firebaseCity = await firestore().collection('cities').doc(city.id).get();
      await firebaseCity.update(city);
    } catch (error) {
      console.log(error);    
    }
  }
}

const updateUsers = async (users) => {
  for (const user of users) {
    try {
      const firebaseUser = await firestore().collection('users').doc(user.id).get();
      await firebaseUser.update(user);
    } catch (error) {
      console.log(error);    
    }
  }
}

Are there any limitations in the firebase functionalities or I'm doing something wrong?

6 months ago · Santiago Gelvez
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar empleo Planes Nuestro proceso Comercial
Legal
Términos y condiciones Política de privacidad
© 2023 PeakU Inc. All Rights Reserved.