sentry: send version in tasks as well

This commit is contained in:
codl 2017-08-07 23:42:38 +02:00
parent 8d2f76927b
commit 4f40853b78
No known key found for this signature in database
GPG Key ID: 6CD7C8891ED1233A
1 changed files with 2 additions and 1 deletions

View File

@ -12,6 +12,7 @@ from io import BytesIO, TextIOWrapper
import json
from kombu import Queue
import random
import version
app = Celery('tasks', broker=flaskapp.config['CELERY_BROKER'], task_serializer='pickle')
app.conf.task_queues = (
@ -26,7 +27,7 @@ app.conf.task_default_exchange_type = 'direct'
if 'SENTRY_DSN' in flaskapp.config:
from raven import Client
from raven.contrib.celery import register_signal, register_logger_signal
sentry = Client(flaskapp.config['SENTRY_DSN'])
sentry = Client(flaskapp.config['SENTRY_DSN'], release=version.version)
register_logger_signal(sentry)
register_signal(sentry)