From 3c75d5a4891a1106f20342495c983ab0cde0bc1d Mon Sep 17 00:00:00 2001 From: akirilyuk Date: Tue, 1 Feb 2022 14:56:07 +0100 Subject: [PATCH] do not await tasks --- lib/tasks/cognigy/index.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/tasks/cognigy/index.js b/lib/tasks/cognigy/index.js index c3385abf..91edd096 100644 --- a/lib/tasks/cognigy/index.js +++ b/lib/tasks/cognigy/index.js @@ -262,7 +262,7 @@ class Cognigy extends Task { if (evt.data) this.config.update(evt.data); if (text) { - await this._enqueueTask((async() => { + this._enqueueTask((async() => { this.logger.info({text}, 'received text'); const sayTask = this._makeSayTask(text); await sayTask.exec(cs, ep, this); @@ -274,7 +274,7 @@ class Cognigy extends Task { try { switch (evt.data.type) { case 'hangup': - await this._enqueueTask((async() => { + this._enqueueTask((async() => { const hangupTask = this._makeHangupTask(evt.data.reason); await hangupTask.exec(cs, ep, this); this.performAction({cognigyResult: 'hangup Succeeded'}); @@ -285,7 +285,7 @@ class Cognigy extends Task { return; case 'refer': - await this._enqueueTask(async() => { + this._enqueueTask(async() => { const referTask = this._makeReferTask(evt.data.number); await referTask.exect(cs, ep, this); this.performAction({cognigyResult: 'refer succeeded'});