Skip to content

Commit

Permalink
Merge pull request #343 from webkom/remove_statsd
Browse files Browse the repository at this point in the history
Remove statsd to make celery great again
  • Loading branch information
eirsyl authored Nov 15, 2016
2 parents c69f3c0 + c1e8a03 commit 9b3bce8
Show file tree
Hide file tree
Showing 7 changed files with 1 addition and 30 deletions.
10 changes: 0 additions & 10 deletions lego/settings/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,6 @@
]

MIDDLEWARE_CLASSES = [
'django_statsd.middleware.GraphiteRequestTimingMiddleware',
'django_statsd.middleware.GraphiteMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'corsheaders.middleware.CorsMiddleware',
'django.middleware.common.CommonMiddleware',
Expand Down Expand Up @@ -136,14 +134,6 @@

CORS_ORIGIN_ALLOW_ALL = True

STATSD_PATCHES = [
'django_statsd.patches.db',
'django_statsd.patches.cache',
]
STATSD_MODEL_SIGNALS = True
STATSD_CELERY_SIGNALS = True
STATSD_PREFIX = 'lego'

CHANNEL_LAYERS = {
'default': {
'BACKEND': 'asgi_redis.RedisChannelLayer',
Expand Down
1 change: 0 additions & 1 deletion lego/settings/celery.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ def on_configure(self):

app.config_from_object('django.conf:settings', namespace='CELERY')
app.autodiscover_tasks()

schedule = {}

app.conf.update(
Expand Down
4 changes: 0 additions & 4 deletions lego/settings/development.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@

INTERNAL_IPS = ['127.0.0.1']
INSTALLED_APPS += [
'django_statsd',
'debug_toolbar',
]
MIDDLEWARE_CLASSES = [
Expand All @@ -47,7 +46,6 @@
'debug_toolbar.panels.signals.SignalsPanel',
'debug_toolbar.panels.logging.LoggingPanel',
'debug_toolbar.panels.redirects.RedirectsPanel',
'django_statsd.panel.StatsdPanel'
]

REST_FRAMEWORK['DEFAULT_RENDERER_CLASSES'] += ['rest_framework.renderers.BrowsableAPIRenderer']
Expand All @@ -63,8 +61,6 @@
},
}

STATSD_CLIENT = 'django_statsd.clients.toolbar'

ELASTICSEARCH = [
{'host': '127.0.0.1'},
]
7 changes: 1 addition & 6 deletions lego/settings/logging.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
},
'root': {
'level': 'DEBUG',
'handlers': ['sentry', 'console', 'syslog', 'statsd'],
'handlers': ['sentry', 'console', 'syslog'],
},
'formatters': {
'verbose': {
Expand Down Expand Up @@ -51,11 +51,6 @@
'facility': 'local7',
'formatter': 'syslog',
},
'statsd': {
'level': 'CRITICAL',
'filters': ['skip_if_testing'],
'class': 'django_statsd.loggers.errors.StatsdHandler',
},
},
'loggers': {
'celery': {
Expand Down
3 changes: 0 additions & 3 deletions lego/settings/production.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,3 @@
CHANNEL_LAYERS['default']['CONFIG'] = {
'hosts': [env('CHANNELS_REDIS_URL')]
}

# Statsd
STATSD_CLIENT = 'django_statsd.clients.normal'
5 changes: 0 additions & 5 deletions lego/settings/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,6 @@
# We don't care about pagination in the tests
REST_FRAMEWORK['DEFAULT_PAGINATION_CLASS'] = None

STATSD_CLIENT = 'django_statsd.clients.null'
STATSD_PATCHES = []
STATSD_MODEL_SIGNALS = False
STATSD_CELERY_SIGNALS = False

ELASTICSEARCH = [
{'host': 'localhost'},
]
Expand Down
1 change: 0 additions & 1 deletion requirements/base.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ raven==5.31.0
redis==2.10.5
hiredis==0.2.0
stream-framework==1.4.0
git+https://github.com/django-statsd/django-statsd.git#67c8077
certifi==2016.9.26
elasticsearch==2.4.0
asgi_redis==0.14.1
Expand Down

0 comments on commit 9b3bce8

Please sign in to comment.