add support for running in AWS autoscale cluster with graceful scale-in and standby

This commit is contained in:
Dave Horton
2020-04-19 16:32:52 -04:00
parent 86cc137085
commit d31c53d383
8 changed files with 284 additions and 6 deletions

View File

@@ -25,7 +25,7 @@ function initMS(logger, wrapper, ms) {
function installSrfLocals(srf, logger) {
logger.debug('installing srf locals');
assert(!srf.locals.dbHelpers);
const {getSBC} = require('./sbc-pinger')(logger);
const {getSBC, lifecycleEmitter} = require('./sbc-pinger')(logger);
const StatsCollector = require('jambonz-stats-collector');
const stats = srf.locals.stats = new StatsCollector(logger);
@@ -135,6 +135,7 @@ function installSrfLocals(srf, logger) {
ipv4: localIp,
serviceUrl: `http://${localIp}:${PORT}`,
getSBC,
lifecycleEmitter,
getFreeswitch,
stats: stats
});