lib/anomaly.js
function sendQueue() {

	var subject = ['Anomaly Report']
	if (!opts.noSubjectApp && opts.app) subject.push(opts.app)
	if (!opts.noSubjectHost) subject.push(os.hostname())
	subject = subject.join(' ')

	var body
	if (skipCounter > 0) { // notify of skipped emails
		enqueuedEmails.push('Skipped:' + skipCounter)
		skipCounter = 0
	}
	body = enqueuedEmails.join('\n\n')
	enqueuedEmails = []

	emailer.send({subject: subject, body: body}) // TODO error handling when haraldops and emailer updated
	lastSent = Date.now()
	startSilentPeriod()
}
function sendQueue() {

	var subject = ['Anomaly Report']
	if (!opts.noSubjectApp && opts.app) subject.push(opts.app)
	if (!opts.noSubjectHost) subject.push(os.hostname())
	subject = subject.join(' ')

	var body
	if (skipCounter > 0) { // notify of skipped emails
		enqueuedEmails.push('Skipped:' + skipCounter)
		skipCounter = 0
	}
	body = enqueuedEmails.join('\n\n')
	enqueuedEmails = []

	emailer.send({subject: subject, body: body}) // TODO error handling when haraldops and emailer updated
	lastSent = Date.now()
	startSilentPeriod()
}
function sendQueue ( ) { var subject = [ 'Anomaly Report' ] if ( ! opts . noSubjectApp && opts . app ) subject . push ( opts . app ) if ( ! opts . noSubjectHost ) subject . push ( os . hostname ( ) ) subject = subject . join ( ' ' ) var body if ( skipCounter > 0 ) { // notify of skipped emails enqueuedEmails . push ( 'Skipped:' + skipCounter ) skipCounter = 0 } body = enqueuedEmails . join ( '\n\n' ) enqueuedEmails = [ ] emailer . send ( { subject : subject , body : body } ) // TODO error handling when haraldops and emailer updated lastSent = Date . now ( ) startSilentPeriod ( ) }
flush the send queue to an email
flush the send queue to an email