mirror of
https://github.com/jambonz/jambonz-feature-server.git
synced 2025-12-21 17:17:58 +00:00
do not await tasks
This commit is contained in:
@@ -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'});
|
||||
|
||||
Reference in New Issue
Block a user