コード例 #1
0
ファイル: utils.py プロジェクト: a70/geonode
 def run(self):
     q = RequestToMonitoringThread.q
     while True:
         if not q.empty():
             item = q.get()
             req, resp = item
             RequestEvent.from_geonode(self.service, req, resp)
コード例 #2
0
ファイル: utils.py プロジェクト: geosolutions-it/geonode
 def run(self):
     q = RequestToMonitoringThread.q
     while True:
         if not q.empty():
             item = q.get()
             req, resp = item
             RequestEvent.from_geonode(self.service, req, resp)
コード例 #3
0
ファイル: utils.py プロジェクト: a70/geonode
    def emit(self, record):
        exc_info = record.exc_info
        req = record.request
        resp = record.response
        if not req._monitoring.get('processed'):
            try:
                re = RequestEvent.from_geonode(self.service, req, resp)
                req._monitoring['processed'] = re
            except BaseException:
                req._monitoring['processed'] = None
        re = req._monitoring.get('processed')

        if re and exc_info:
            tb = traceback.format_exception(*exc_info)
            ExceptionEvent.add_error(self.service, exc_info[1], tb, request=re)
コード例 #4
0
ファイル: utils.py プロジェクト: geosolutions-it/geonode
    def emit(self, record):
        exc_info = record.exc_info
        req = record.request
        resp = record.response
        if not req._monitoring.get('processed'):
            try:
                re = RequestEvent.from_geonode(self.service, req, resp)
                req._monitoring['processed'] = re
            except BaseException:
                req._monitoring['processed'] = None
        re = req._monitoring.get('processed')

        if re and exc_info:
            tb = traceback.format_exception(*exc_info)
            ExceptionEvent.add_error(self.service, exc_info[1], tb, request=re)