示例#1
0
 def __init__(self):
     if hasattr(settings, 'BLUEOX_HOST'):
         if settings.BLUEOX_HOST:
             blueox.default_configure(settings.BLUEOX_HOST)
         else:
             blueox.configure(None, None)
     else:
         blueox.default_configure()
示例#2
0
def on_worker_process_init(**kwargs):
    if hasattr(settings, 'BLUEOX_HOST'):
        if settings.BLUEOX_HOST:
            blueox.default_configure(settings.BLUEOX_HOST)
        else:
            blueox.configure(None, None)
    else:
        blueox.default_configure()
示例#3
0
def on_worker_process_init(**kwargs):
    if hasattr(settings, 'BLUEOX_HOST'):
        if settings.BLUEOX_HOST:
            blueox.default_configure(settings.BLUEOX_HOST)
        else:
            blueox.configure(None, None)
    else:
        blueox.default_configure()
示例#4
0
 def __init__(self):
     if hasattr(settings, 'BLUEOX_HOST'):
         if settings.BLUEOX_HOST:
             blueox.default_configure(settings.BLUEOX_HOST)
         else:
             blueox.configure(None, None)
     else:
         blueox.default_configure()
示例#5
0
    def __init__(self, app):
        self.app = app

        if 'BLUEOX_HOST' in app.config:
            self.blueox_host = app.config['BLUEOX_HOST']
            if self.blueox_host:
                blueox.default_configure(self.blueox_host)
        else:
            blueox.default_configure()

        self.app.before_request(self.before_request)
        self.app.after_request(self.after_request)

        got_request_exception.connect(self.handle_exception, self.app)
示例#6
0
    def __init__(self, app):
        self.app = app

        if 'BLUEOX_HOST' in app.config:
            self.blueox_host = app.config['BLUEOX_HOST']
            if self.blueox_host:
                blueox.default_configure(self.blueox_host)
        else:
            blueox.default_configure()

        self.app.before_request(self.before_request)
        self.app.after_request(self.after_request)

        got_request_exception.connect(self.handle_exception, self.app)