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