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

169
Vistas
How to manage a queue with timer and with some conditions in NodeJs?

I am creating a Taxi App, In which, when user order a taxi, three nearby driver are selected by system, and it sends a request to first driver.

Now driver will have 30sec to accept or decline the booking, if driver accepts then booking is confirmed and no other driver will be notified,

But if driver decline booking or didn't respond to the booking in 30 sec, a request will be send to second driver.

Now the problem is that, I don't know how to manage a action queue in which there are three conditions.

  1. If system don't get a reply from first driver in 30 sec, send request to next driver in queue

  2. If driver accept the booking the stop the queue process and book a ride.

  3. If driver decline the booking, then instantly send request to next driver without waiting for 30sec period.

    Any suggestion and Ideas are welcome.

about 4 years ago · Santiago Trujillo
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