mirror of
https://github.com/jambonz/jambonz-feature-server.git
synced 2026-01-25 02:07:56 +00:00
SIGUSR1 should cause fs to commence drying up calls but do not exit when call count reaches zero (#1486)
This commit is contained in:
@@ -120,17 +120,8 @@ module.exports = (logger) => {
|
||||
}
|
||||
pingProxies(srf);
|
||||
|
||||
// if we have zero calls, we can complete the scale-in right
|
||||
setTimeout(() => {
|
||||
const calls = srf.locals.sessionTracker.count;
|
||||
if (calls === 0) {
|
||||
logger.info('scale-in can complete immediately as we have no calls in progress');
|
||||
process.exit(0);
|
||||
}
|
||||
else {
|
||||
logger.info(`${calls} calls in progress; scale-in will complete when they are done`);
|
||||
}
|
||||
}, 5000);
|
||||
// Note: in response to SIGUSR1 we start drying up but do not exit when calls reach zero.
|
||||
// This is to allow external scripts that sent the signal to manage the lifecycle.
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user