mirror of
https://github.com/jambonz/jambonz-feature-server.git
synced 2025-12-22 01:27:55 +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 (evt.data) this.config.update(evt.data);
|
||||||
if (text) {
|
if (text) {
|
||||||
|
|
||||||
await this._enqueueTask((async() => {
|
this._enqueueTask((async() => {
|
||||||
this.logger.info({text}, 'received text');
|
this.logger.info({text}, 'received text');
|
||||||
const sayTask = this._makeSayTask(text);
|
const sayTask = this._makeSayTask(text);
|
||||||
await sayTask.exec(cs, ep, this);
|
await sayTask.exec(cs, ep, this);
|
||||||
@@ -274,7 +274,7 @@ class Cognigy extends Task {
|
|||||||
try {
|
try {
|
||||||
switch (evt.data.type) {
|
switch (evt.data.type) {
|
||||||
case 'hangup':
|
case 'hangup':
|
||||||
await this._enqueueTask((async() => {
|
this._enqueueTask((async() => {
|
||||||
const hangupTask = this._makeHangupTask(evt.data.reason);
|
const hangupTask = this._makeHangupTask(evt.data.reason);
|
||||||
await hangupTask.exec(cs, ep, this);
|
await hangupTask.exec(cs, ep, this);
|
||||||
this.performAction({cognigyResult: 'hangup Succeeded'});
|
this.performAction({cognigyResult: 'hangup Succeeded'});
|
||||||
@@ -285,7 +285,7 @@ class Cognigy extends Task {
|
|||||||
|
|
||||||
return;
|
return;
|
||||||
case 'refer':
|
case 'refer':
|
||||||
await this._enqueueTask(async() => {
|
this._enqueueTask(async() => {
|
||||||
const referTask = this._makeReferTask(evt.data.number);
|
const referTask = this._makeReferTask(evt.data.number);
|
||||||
await referTask.exect(cs, ep, this);
|
await referTask.exect(cs, ep, this);
|
||||||
this.performAction({cognigyResult: 'refer succeeded'});
|
this.performAction({cognigyResult: 'refer succeeded'});
|
||||||
|
|||||||
Reference in New Issue
Block a user