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()
def __init__(self, request, activity): self.request = request self.email = emails.get(activity.type)(activity)
def __init__(self, activity): self.email = emails.get(activity.type)(activity)