示例#1
0
 def send_failure_email(self, suppress_email=False):
     """Send an email about the failed check *check* unless the email should
     be suppressed, in which case simply log that it was suppressed."""
     if suppress_email:
         LOGGER.info('Suppressing email for failed check [{}]'.format(
             check['title']))
     send_alert_email(
         EMAIL_CONTENT.format(
             process=self.name,
             ),
         EMAIL_SUBJECT.format(self.name),
     )
示例#2
0
 def send_failure_email(self, check, reason, suppress_email=False):
     """Send an email about the failed check *check* unless the email should
     be suppressed, in which case simply log that it was suppressed."""
     if suppress_email:
         LOGGER.info('Suppressing email for failed check [{}]'.format(
             check['title']))
     send_alert_email(
         EMAIL_CONTENT.format(
             app_name=self.name,
             check=check['title'],
             address=check['url'],
             method=check['method'],
             expected=check['expected'],
             actual=reason,
             ),
         EMAIL_SUBJECT.format(self.name),
     )
示例#3
0
 def send_failure_email(self, check, reason, suppress_email=False):
     """Send an email about the failed check *check* unless the email should
     be suppressed, in which case simply log that it was suppressed."""
     if suppress_email:
         LOGGER.info('Suppressing email for failed check [{}]'.format(
             check['title']))
     send_alert_email(
         EMAIL_CONTENT.format(
             app_name=self.name,
             check=check['title'],
             address=check['url'],
             method=check['method'],
             expected=check['expected'],
             actual=reason,
         ),
         EMAIL_SUBJECT.format(self.name),
     )