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

180
Vistas
Promise.all produced "throttle queue is over max capacity"

When running this code, I get "trottle queue is over max capacity" error and I dont know how to get this to work.

The function that gets called for the service itself is an async function call to a 3rd party API. I could not find any implementation that works for my example and hope to find someone to explain me what is happening here.

Thank you

async analyze() {
    const markets = Object.values(this.service.getMarkets()).filter(
      (m) => this.markets.includes(m.quoteId) && m.active
    );
    const tasks = [];

    for (let i = 0; i < markets.length; i++) {
      //market iteration
      const symbol = markets[i].symbol;

      for (let j = 0; j < this.timeframes.length; j++) {
        //timeframe iteration
        const timeframe = this.timeframes[j];
        tasks.push(this.service.getOHLCV(symbol, timeframe));
      }
    }

    console.log("Tasks to be executed", tasks.length);

    const startTime = Date.now();
    const ohlcvDatasets = await Promise.all(tasks);
    const endTime = Date.now() - startTime;

    console.log(`executed ${tasks.length} tasks in ${endTime} ms`);
    
    this.analyzeRSI(ohlcvDatasets);
  }

this.service.getOHLCV() returns a Promise. The function in the service class makes use of a 3rd party library which calls an external API.

Like so.

getOHLCV(){ return 3rdPartyAPICall }

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