mirror of
https://github.com/django-q2/django-q2.git
synced 2026-09-15 21:47:53 +08:00
Fixes issue with rollbar configuration
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import logging
|
||||
from copy import deepcopy
|
||||
from signal import signal
|
||||
from multiprocessing import cpu_count, Queue
|
||||
|
||||
@@ -50,6 +51,9 @@ class Conf(object):
|
||||
# ORM broker
|
||||
ORM = conf.get('orm', None)
|
||||
|
||||
# Custom broker
|
||||
BROKER = conf.get('broker', None)
|
||||
|
||||
# Database Poll
|
||||
POLL = conf.get('poll', 0.2)
|
||||
|
||||
@@ -169,7 +173,7 @@ if not logger.handlers:
|
||||
|
||||
# rollbar
|
||||
if Conf.ROLLBAR:
|
||||
rollbar_conf = Conf.ROLLBAR
|
||||
rollbar_conf = deepcopy(Conf.ROLLBAR)
|
||||
try:
|
||||
import rollbar
|
||||
rollbar.init(rollbar_conf.pop('access_token'), environment=rollbar_conf.pop('environment'), **rollbar_conf)
|
||||
@@ -180,9 +184,6 @@ else:
|
||||
rollbar = None
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# get parent pid compatibility
|
||||
def get_ppid():
|
||||
if hasattr(os, 'getppid'):
|
||||
|
||||
Reference in New Issue
Block a user