Skip to content

Commit

Permalink
bug que cerraba el microservicio
Browse files Browse the repository at this point in the history
  • Loading branch information
bidof committed Mar 11, 2024
1 parent 0667f55 commit 051307d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion questionservice/scheduler.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ class Scheduler {
cron.schedule('*/30 * * * *', async () => {
this.success = false;
while (!this.success) {
this.addQuestion();
//ojo como es asincrono si no lo pones el bucle se sigue ejecutando y petas la pila de javasycrpit y cae el contendor
await this.addQuestion();
}
});
}
Expand Down

0 comments on commit 051307d

Please sign in to comment.