add fs_public_ip to webhook payload (only when running in ec2 autoscale group)

This commit is contained in:
Dave Horton
2022-02-10 09:51:48 -05:00
parent d8bfa33a00
commit 941727e93f
4 changed files with 12 additions and 0 deletions

View File

@@ -28,6 +28,10 @@ module.exports = (logger) => {
lifecycleEmitter = await require('./aws-sns-lifecycle')(logger);
lifecycleEmitter
.on('SubscriptionConfirmation', ({publicIp}) => {
const {srf} = require('../..');
srf.locals.publicIp = publicIp;
})
.on(LifeCycleEvents.ScaleIn, () => {
logger.info('AWS scale-in notification: begin drying up calls');
dryUpCalls = true;