Skip to content

Commit

Permalink
Use standard tag adding interface in TagPlugin (fixes getsentryGH-596)
Browse files Browse the repository at this point in the history
  • Loading branch information
dcramer committed Sep 11, 2012
1 parent e4e3e12 commit a042dc0
Showing 1 changed file with 2 additions and 19 deletions.
21 changes: 2 additions & 19 deletions src/sentry/plugins/bases/tag.py
Expand Up @@ -5,8 +5,7 @@
:copyright: (c) 2010-2012 by the Sentry Team, see AUTHORS for more details.
:license: BSD, see LICENSE for more details.
"""
from sentry import app
from sentry.models import FilterValue, MessageFilterValue
from sentry.models import Group
from sentry.plugins import Plugin
from django.db.models import Sum

Expand Down Expand Up @@ -63,20 +62,4 @@ def widget(self, request, group, **kwargs):
})

def post_process(self, group, event, is_new, is_sample, **kwargs):
for value in self.get_tag_values(event):
FilterValue.objects.get_or_create(
project=group.project,
key=self.tag,
value=value,
)

app.buffer.incr(MessageFilterValue, {
'times_seen': 1,
}, {
'group': group,
'project': group.project,
'key': self.tag,
'value': value,
}, {
'last_seen': group.last_seen,
})
Group.objects.add_tags(group, [(self.tag, v) for v in self.get_tag_values(event)])

0 comments on commit a042dc0

Please sign in to comment.