remove mail notification for apptask and process crash

only events are raised for these
This commit is contained in:
Girish Ramakrishnan
2019-03-25 13:55:32 -07:00
parent 3b908a5857
commit ea092bda99
3 changed files with 0 additions and 85 deletions
-22
View File
@@ -9,7 +9,6 @@ exports = module.exports = {
sendDigest: sendDigest,
sendInvite: sendInvite,
unexpectedExit: unexpectedExit,
appUp: appUp,
appDied: appDied,
@@ -453,27 +452,6 @@ function oomEvent(mailTo, program, event) {
});
}
// this function bypasses the queue intentionally. it is also expected to work without the mailer module initialized
// NOTE: crashnotifier should ideally be able to send mail when there is no db, however we need the 'from' address domain from the db
function unexpectedExit(mailTo, subject, context) {
assert.strictEqual(typeof mailTo, 'string');
assert.strictEqual(typeof subject, 'string');
assert.strictEqual(typeof context, 'string');
getMailConfig(function (error, mailConfig) {
if (error) return debug('Error getting mail details:', error);
var mailOptions = {
from: mailConfig.notificationFrom,
to: mailTo,
subject: `[${mailConfig.cloudronName}] ${subject}`,
text: render('unexpected_exit.ejs', { cloudronName: mailConfig.cloudronName, subject: subject, context: context, format: 'text' })
};
sendMails([ mailOptions ]);
});
}
function sendTestMail(domain, email) {
assert.strictEqual(typeof domain, 'string');
assert.strictEqual(typeof email, 'string');