Example #1
0
    def notify_about_activity(self, activity):
        metrics.incr("mail_adapter.notify_about_activity")
        # TODO: We should move these into the `mail` module.
        from sentry.plugins.sentry_mail.activity import emails

        email_cls = emails.get(activity.type)
        if not email_cls:
            logger.debug(u"No email associated with activity type `{}`".format(
                activity.get_type_display()))
            return

        email = email_cls(activity)
        email.send()
Example #2
0
 def __init__(self, request, activity):
     self.request = request
     self.email = emails.get(activity.type)(activity)
Example #3
0
 def __init__(self, activity):
     self.email = emails.get(activity.type)(activity)
Example #4
0
 def __init__(self, request, activity):
     self.request = request
     self.email = emails.get(activity.type)(activity)
Example #5
0
 def __init__(self, activity):
     self.email = emails.get(activity.type)(activity)