Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

94
Visualizações
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 à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda