Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

174
Views
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.

over 4 years ago · Santiago Trujillo
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!