mirror of
https://github.com/jambonz/jambonz-feature-server.git
synced 2025-12-20 16:50:39 +00:00
minor logging changes
This commit is contained in:
@@ -65,18 +65,17 @@ class BackgroundTaskManager extends Emitter {
|
|||||||
// Remove task from managed List
|
// Remove task from managed List
|
||||||
this.tasks.delete(type);
|
this.tasks.delete(type);
|
||||||
} else {
|
} else {
|
||||||
this.logger.info(`stopping background task, ${type} is not running, skipped`);
|
this.logger.debug(`stopping background task, ${type} is not running, skipped`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
stopAll() {
|
stopAll() {
|
||||||
this.logger.info('BackgroundTaskManager:stopAll');
|
this.logger.debug('BackgroundTaskManager:stopAll');
|
||||||
for (const key of this.tasks.keys()) {
|
for (const key of this.tasks.keys()) {
|
||||||
this.stop(key);
|
this.stop(key);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Initiate Task
|
|
||||||
// Initiate Listen
|
// Initiate Listen
|
||||||
async _initListen(opts, bugname = 'jambonz-background-listen', ignoreCustomerData = false, type = 'listen') {
|
async _initListen(opts, bugname = 'jambonz-background-listen', ignoreCustomerData = false, type = 'listen') {
|
||||||
let task;
|
let task;
|
||||||
@@ -176,7 +175,7 @@ class BackgroundTaskManager extends Emitter {
|
|||||||
}
|
}
|
||||||
|
|
||||||
_taskCompleted(type, task) {
|
_taskCompleted(type, task) {
|
||||||
this.logger.info({type, task}, 'BackgroundTaskManager:_taskCompleted: task completed');
|
this.logger.debug({type, task}, 'BackgroundTaskManager:_taskCompleted: task completed');
|
||||||
task.removeAllListeners();
|
task.removeAllListeners();
|
||||||
task.span.end();
|
task.span.end();
|
||||||
this.tasks.delete(type);
|
this.tasks.delete(type);
|
||||||
@@ -189,7 +188,7 @@ class BackgroundTaskManager extends Emitter {
|
|||||||
}
|
}
|
||||||
|
|
||||||
_bargeInTaskCompleted(evt) {
|
_bargeInTaskCompleted(evt) {
|
||||||
this.logger.info({evt}, 'BackgroundTaskManager:_bargeInTaskCompleted on event from background bargeIn');
|
this.logger.debug({evt}, 'BackgroundTaskManager:_bargeInTaskCompleted on event from background bargeIn');
|
||||||
this.emit('bargeIn-done', evt);
|
this.emit('bargeIn-done', evt);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user