mirror of
https://github.com/jambonz/jambonz-feature-server.git
synced 2025-12-21 17:17:58 +00:00
make gather on final ping a task
This commit is contained in:
@@ -263,9 +263,16 @@ class Cognigy extends Task {
|
|||||||
try {
|
try {
|
||||||
// lets wait until we have finished processing the speech before
|
// lets wait until we have finished processing the speech before
|
||||||
// starting a gather...
|
// starting a gather...
|
||||||
await this.taskQueue.lastPromise;
|
this._enqueueTask(async() => {
|
||||||
const gatherTask = this._makeGatherTask();
|
|
||||||
await gatherTask.exec(cs, ep, this);
|
try {
|
||||||
|
const gatherTask = this._makeGatherTask();
|
||||||
|
await gatherTask.exec(cs, ep, this);
|
||||||
|
} catch (err) {
|
||||||
|
this.logger.info({err}, 'Cognigy final ping gather task returned error');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
this.logger.info({err}, 'Cognigy gather task returned error');
|
this.logger.info({err}, 'Cognigy gather task returned error');
|
||||||
}
|
}
|
||||||
@@ -364,7 +371,7 @@ class Cognigy extends Task {
|
|||||||
// clear task queue, resolve the last promise and cleanup;
|
// clear task queue, resolve the last promise and cleanup;
|
||||||
this.taskQueue.lastPromise.resolve();
|
this.taskQueue.lastPromise.resolve();
|
||||||
this.taskQueue.end();
|
this.taskQueue.end();
|
||||||
this._killSayTasks()
|
this._killSayTasks();
|
||||||
this.taskQueue.autostart = true;
|
this.taskQueue.autostart = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user