From 051307dd7f0b554b53757477c82976655550f1a9 Mon Sep 17 00:00:00 2001 From: bidof Date: Mon, 11 Mar 2024 23:50:31 +0100 Subject: [PATCH] bug que cerraba el microservicio --- questionservice/scheduler.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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(); } }); }