Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

100
Vistas
cloud function triggering delay and retry

I have a firebase trigger function with failurePolicy: true (the function will automatically retry if fails).

I avoid infinite retry loops as described here : https://cloud.google.com/functions/docs/bestpractices/retries#set_an_end_condition_to_avoid_infinite_retry_loops

const eventAge = Date.now() - Date.parse(event.timestamp);
const eventMaxAge = 10000;

// Ignore events that are too old
if (eventAge > eventMaxAge) {
  console.log(`Dropping event ${event} with age ${eventAge} ms.`);
  callback();
  return;
}

I also set the eventMaxAge at 10000ms, but sometimes I get error message with an event age superior > 10000ms on the first processing (not a retry).

Dropping event xxx with age 63210 ms.

That means the function has been first triggered 63s after the event (!) and the function has dropped the event without being processed.

What are the delays for a function to be triggered? How do you handle such case to be certain the event is processed ?

about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda