mirror of
https://github.com/jambonz/jambonz-feature-server.git
synced 2025-12-21 17:17:58 +00:00
bugfix: if enqeue task is killed because it is being replaced with new app supplied by LCC, ignore any app returned from the actionHook as LCC takes precedence
This commit is contained in:
@@ -65,7 +65,7 @@ class TaskEnqueue extends Task {
|
|||||||
super.kill(cs);
|
super.kill(cs);
|
||||||
this.killReason = reason || KillReason.Hangup;
|
this.killReason = reason || KillReason.Hangup;
|
||||||
this.logger.info(`TaskEnqueue:kill ${this.queueName} with reason ${this.killReason}`);
|
this.logger.info(`TaskEnqueue:kill ${this.queueName} with reason ${this.killReason}`);
|
||||||
this.emitter.emit('kill');
|
this.emitter.emit('kill', reason || KillReason.Hangup);
|
||||||
this.notifyTaskDone();
|
this.notifyTaskDone();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -239,7 +239,8 @@ class TaskEnqueue extends Task {
|
|||||||
ep.unbridge().catch((err) => {});
|
ep.unbridge().catch((err) => {});
|
||||||
resolve();
|
resolve();
|
||||||
})
|
})
|
||||||
.on('kill', () => {
|
.on('kill', (reason) => {
|
||||||
|
this.killReason = reason;
|
||||||
this.logger.info(`TaskEnqueue:_bridgeLocal ending with ${this.killReason}`);
|
this.logger.info(`TaskEnqueue:_bridgeLocal ending with ${this.killReason}`);
|
||||||
ep.unbridge().catch((err) => {});
|
ep.unbridge().catch((err) => {});
|
||||||
|
|
||||||
@@ -277,7 +278,6 @@ class TaskEnqueue extends Task {
|
|||||||
const {lengthOfList} = cs.srf.locals.dbHelpers;
|
const {lengthOfList} = cs.srf.locals.dbHelpers;
|
||||||
const members = await lengthOfList(this.queueName);
|
const members = await lengthOfList(this.queueName);
|
||||||
this.dequeued = true;
|
this.dequeued = true;
|
||||||
|
|
||||||
cs.performQueueWebhook({
|
cs.performQueueWebhook({
|
||||||
event: 'leave',
|
event: 'leave',
|
||||||
queue: this.data.name,
|
queue: this.data.name,
|
||||||
|
|||||||
Reference in New Issue
Block a user