Browse Source

Remove unused processors

David Cramer 10 years ago
parent
commit
68fff3da4a

+ 2 - 2
src/sentry/manager.py

@@ -28,9 +28,9 @@ from sentry.constants import (
     DEFAULT_LOGGER_NAME, MAX_CULPRIT_LENGTH, MAX_TAG_VALUE_LENGTH
 )
 from sentry.db.models import BaseManager
-from sentry.processors.base import send_group_processors
 from sentry.signals import regression_signal
 from sentry.tasks.index import index_event
+from sentry.tasks.post_process import post_process_group
 from sentry.tsdb.base import TSDBModel
 from sentry.utils.cache import memoize
 from sentry.utils.db import get_db_engine, attach_foreignkey
@@ -306,7 +306,7 @@ class GroupManager(BaseManager):
         transaction.commit_unless_managed(using=using)
 
         if not raw:
-            send_group_processors(
+            post_process_group.delay(
                 group=group,
                 event=event,
                 is_new=is_new or is_regression,  # backwards compat

+ 0 - 9
src/sentry/processors/__init__.py

@@ -1,9 +0,0 @@
-"""
-sentry.processors
-~~~~~~~~~~~~~~~~~
-
-:copyright: (c) 2010-2014 by the Sentry Team, see AUTHORS for more details.
-:license: BSD, see LICENSE for more details.
-"""
-
-from sentry.processors.base import *  # NOQA

+ 0 - 16
src/sentry/processors/base.py

@@ -1,16 +0,0 @@
-"""
-sentry.processors.base
-~~~~~~~~~~~~~~~~~~~~~~
-
-:copyright: (c) 2010-2014 by the Sentry Team, see AUTHORS for more details.
-:license: BSD, see LICENSE for more details.
-"""
-
-from sentry.tasks.post_process import post_process_group
-
-
-__all__ = ('send_group_processors',)
-
-
-def send_group_processors(group, event, **kwargs):
-    post_process_group.delay(event=event, **kwargs)

+ 0 - 17
src/sentry/processors/console.py

@@ -1,17 +0,0 @@
-"""
-sentry.processors.console
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-:copyright: (c) 2010-2014 by the Sentry Team, see AUTHORS for more details.
-:license: BSD, see LICENSE for more details.
-"""
-from __future__ import print_function
-
-from .base import Processor
-
-
-class ConsoleProcessor(Processor):
-    def post_process(self, event, **kwargs):
-        print('Received an event:')
-        print('  ID:', event.event_id)
-        print('  Project:', event.project.name)

+ 0 - 3
tests/sentry/manager/tests.py

@@ -41,21 +41,18 @@ class SentryManagerTest(TestCase):
         self.assertEquals(event.message, 'foo')
         self.assertEquals(event.project_id, 1)
 
-    @mock.patch('sentry.manager.send_group_processors', mock.Mock())
     @mock.patch('sentry.manager.GroupManager.add_tags')
     def test_tags_as_list(self, add_tags):
         event = Group.objects.from_kwargs(1, message='foo', tags=[('foo', 'bar')])
         group = event.group
         add_tags.assert_called_once_with(group, [('foo', 'bar'), ('level', 'error'), ('logger', 'root')])
 
-    @mock.patch('sentry.manager.send_group_processors', mock.Mock())
     @mock.patch('sentry.manager.GroupManager.add_tags')
     def test_tags_as_dict(self, add_tags):
         event = Group.objects.from_kwargs(1, message='foo', tags={'foo': 'bar'})
         group = event.group
         add_tags.assert_called_once_with(group, [('foo', 'bar'), ('level', 'error'), ('logger', 'root')])
 
-    @mock.patch('sentry.manager.send_group_processors', mock.Mock())
     def test_platform_is_saved(self):
         event = Group.objects.from_kwargs(1, message='foo', platform='python')
         group = event.group