Пример #1
0
    def notify_start_of_call(self):
        """
        sends notification email informing user that ``self.call_id`` has been initiated
        """
        e = self.email_info

        report_time = get_time()
        email_sub = "[SITREP from %s] Run %s - Starting %s at %s" % (self._hostname, self.run_id, self.call_id,
                                                                     report_time)
        email_body = "%s\n\n%s" % (email_sub, self.cmd_string)
        server_info = self.yargs.run_options.custom_smtp
        email_notification(e.email_from, e.email_to, email_sub, email_body, base64.b64decode(e.email_li), server_info)
Пример #2
0
    def notify_start_of_call(self):
        """
        sends notification email informing user that ``self.call_id`` has been initiated
        """
        e = self.email_info

        report_time = get_time()
        email_sub = "[SITREP from %s] Run %s - Starting %s at %s" % (
            self._hostname, self.run_id, self.call_id, report_time)
        email_body = "%s\n\n%s" % (email_sub, self.cmd_string)
        server_info = self.yargs.run_options.custom_smtp
        email_notification(e.email_from, e.email_to, email_sub, email_body,
                           base64.b64decode(e.email_li), server_info)
Пример #3
0
    def notify_end_of_call(self):
        """
        sends notification email informing user that ``self.call_id`` has exited
        """
        e = self.email_info

        report_time = get_time()
        email_sub = "[SITREP from %s] Run %s - Exited %s at %s" % (self._hostname, self.run_id, self.call_id,
                                                                   report_time)

        #    repeat subject in body
        email_body = email_sub

        email_body += "\n\n ==> stderr <==\n\n%s" % self.stderr_msg
        server_info = self.yargs.run_options.custom_smtp
        email_notification(e.email_from, e.email_to, email_sub, email_body, base64.b64decode(e.email_li), server_info)
Пример #4
0
    def notify_end_of_call(self):
        """
        sends notification email informing user that ``self.call_id`` has exited
        """
        e = self.email_info

        report_time = get_time()
        email_sub = "[SITREP from %s] Run %s - Exited %s at %s" % (
            self._hostname, self.run_id, self.call_id, report_time)

        #    repeat subject in body
        email_body = email_sub

        email_body += "\n\n ==> stderr <==\n\n%s" % self.stderr_msg
        server_info = self.yargs.run_options.custom_smtp
        email_notification(e.email_from, e.email_to, email_sub, email_body,
                           base64.b64decode(e.email_li), server_info)