SIGUSR1 should cause fs to commence drying up calls but do not exit when call count reaches zero (#1486)

This commit is contained in:
Dave Horton
2026-01-04 12:23:26 -05:00
committed by GitHub
parent 09220872ae
commit 83a8cf6d25

View File

@@ -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.
});
}