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

175
Views
Cómo devolver valor condicionalmente en `async-retry`

Estoy usando el módulo de nodo de reintento asíncrono . Necesito devolver el valor si se cumple una condición distinta a la que quiero volver a intentar.

Esto es lo que estoy tratando de hacer pero no funciona:

 await retry( async () => { const lists = await this.projectPlanService .getProjectPlans(jwtData); const listsWithCount = await this.populateSiteCounts(lists as ProjectPlan[]); // if the condition meets then skip retrying, if not then retry again - how to do that? if (lists.some(o => o.id === projectPlan.id)) { return res.send({ success: Boolean(projectPlan.id), projectPlanId: projectPlan.id, lists: listsWithCount?.sort((a, b) => b.id - a.id), }); } return false; }, { retries: 5, }, );
about 4 years ago · Juan Pablo Isaza
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!