From 4f40853b78f7a5b3b9d87e107ae7e8b05ef538a6 Mon Sep 17 00:00:00 2001 From: codl Date: Mon, 7 Aug 2017 23:42:38 +0200 Subject: [PATCH] sentry: send version in tasks as well --- tasks.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tasks.py b/tasks.py index 73d285b..3f53ae2 100644 --- a/tasks.py +++ b/tasks.py @@ -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)