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

108
Vistas
node js api design and waiting for long process excution

I have 2 tables

  1. pin codes - list of pin codes [lets take 5000]

  2. addresses - corresponding addresses-from an API

I want to write an API like '/update-addresses' by using Node Js

After updating the required table API should give response back like 'update done'

above scenario was working fine in my case when i am going with 10 pin codes.

but for 100 or more it's taking too much time to complete. is it will through an error like timed out?

how we can reduce the time for 100 or more pin codes?

algorithm:

fun(res,req){
a=list of pin codes 
output=[]
Promise.all(a.map(){
 let p=new Promise((resolve)=>{
   axios(API call).then(d=>{
     resolve(d)
   })
 })
 return p.then(out=>{
   output.push(out)
 })
}).then(()=>{
  res.send(output)
})

}
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