You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey, I discovered that Winston wont emit 'finish'-event. And this package neither!
This is a problem for me in testing with Mocha, and in production with AWS Lambda's.
Now I can discover when its safe to terminate the process.
My Fix:
Example:
const logger = winston.createLogger({
transports: [
new (winston.transports.Console)({
timestamp: true,
colorize: true,
})
]
})
const transport = new CloudWatchTransport(config)
logger.add(transport)
transport.on('finish', () => { console.log('finished!') })
How you might ask?
By:
relay.js line 63: if (i === batch.length - 1) this.emit('finish')
Hey, I discovered that Winston wont emit 'finish'-event. And this package neither!
This is a problem for me in testing with Mocha, and in production with AWS Lambda's.
Now I can discover when its safe to terminate the process.
My Fix:
Example:
How you might ask?
By:
relay.js line 63:
if (i === batch.length - 1) this.emit('finish')
index.js line: 16:
this._relay.on('finish', () => this.emit('finish'))
Which in turn allows me to use detect when the Lambda is safe to freeze
The text was updated successfully, but these errors were encountered: