diff --git a/questionservice/scheduler.js b/questionservice/scheduler.js index 901dcc2..e2ccd4f 100644 --- a/questionservice/scheduler.js +++ b/questionservice/scheduler.js @@ -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(); } }); }