added raven logging for celery

This commit is contained in:
Jay 2015-12-21 11:28:27 +01:00
parent 23877e908a
commit 91f223d7bd
2 changed files with 8 additions and 2 deletions

View File

@ -2,6 +2,10 @@
All enhancements and patches to cookiecutter-django will be documented in this file.
This project adheres to [Semantic Versioning](http://semver.org/).
## [2015-12-21]
### Changed
- Added sentry logger to celery config (@jayfk)
## [2015-12-16]
- Update preview 4xx error pages to accept `exception` argument (@theskumar)

View File

@ -29,11 +29,13 @@ class CeleryConfig(AppConfig):
# Celery signal registration
from raven import Client as RavenClient
from raven.contrib.celery import register_signal as raven_register_signal
from raven.contrib.celery import register_logger_signal as raven_register_logger_signal
raven_client = RavenClient(dsn=settings.RAVEN_CONFIG['DSN'])
raven_register_logger_signal(raven_client)
raven_register_signal(raven_client)
{%- endif %}
{% if cookiecutter.use_opbeat == "y" -%}
if hasattr(settings, 'OPBEAT'):
from opbeat.contrib.django.models import client as opbeat_client