mirror of
https://github.com/jambonz/jambonz-feature-server.git
synced 2025-12-21 17:17:58 +00:00
exec gather after finishing queue
This commit is contained in:
@@ -241,15 +241,15 @@ class Cognigy extends Task {
|
||||
|
||||
async _onBotFinalPing(cs, ep) {
|
||||
this.logger.info({prompts: this.prompts}, 'Cognigy:_onBotFinalPing');
|
||||
this._enqueueTask(async() => {
|
||||
try {
|
||||
// lets wait until we have finished processing the speech before
|
||||
// starting a gather...
|
||||
await this.taskQueue.lastPromise;
|
||||
const gatherTask = this._makeGatherTask();
|
||||
await gatherTask.exec(cs, ep, this);
|
||||
try {
|
||||
await sayTask.exec(cs, ep, this);
|
||||
} catch (err) {
|
||||
this.logger.info({err}, 'Cognigy gather task returned error');
|
||||
}
|
||||
});
|
||||
} catch (err) {
|
||||
this.logger.info({err}, 'Cognigy gather task returned error');
|
||||
}
|
||||
}
|
||||
|
||||
async _onBotUtterance(cs, ep, evt) {
|
||||
|
||||
Reference in New Issue
Block a user