mirror of
https://github.com/cookiecutter/cookiecutter-django.git
synced 2025-02-25 07:50:40 +03:00
Merge pull request #373 from jazztpt/master
Fix for raven not being loaded on development (taskapp)
This commit is contained in:
commit
a578c3ba60
|
@ -4,10 +4,7 @@ import os
|
||||||
from celery import Celery
|
from celery import Celery
|
||||||
from django.apps import AppConfig
|
from django.apps import AppConfig
|
||||||
from django.conf import settings
|
from django.conf import settings
|
||||||
{% if cookiecutter.use_sentry == "y" -%}
|
|
||||||
from raven import Client
|
|
||||||
from raven.contrib.celery import register_signal
|
|
||||||
{%- endif %}
|
|
||||||
|
|
||||||
if not settings.configured:
|
if not settings.configured:
|
||||||
# set the default Django settings module for the 'celery' program.
|
# set the default Django settings module for the 'celery' program.
|
||||||
|
@ -30,6 +27,8 @@ class CeleryConfig(AppConfig):
|
||||||
{% if cookiecutter.use_sentry == "y" -%}
|
{% if cookiecutter.use_sentry == "y" -%}
|
||||||
if hasattr(settings, 'RAVEN_CONFIG'):
|
if hasattr(settings, 'RAVEN_CONFIG'):
|
||||||
# Celery signal registration
|
# Celery signal registration
|
||||||
|
from raven import Client
|
||||||
|
from raven.contrib.celery import register_signal
|
||||||
client = Client(dsn=settings.RAVEN_CONFIG['dsn'])
|
client = Client(dsn=settings.RAVEN_CONFIG['dsn'])
|
||||||
register_signal(client)
|
register_signal(client)
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user