mirror of
https://github.com/camptocamp/odoo-cloud-platform.git
synced 2026-06-23 18:04:34 +00:00
Merge commit 'refs/pull/468/head' of github.com:camptocamp/odoo-cloud-platform into merge-branch-2074-update-cloud-addons-ecfbff94
This commit is contained in:
@@ -6,7 +6,6 @@ exclude: |
|
|||||||
^base_fileurl_field/|
|
^base_fileurl_field/|
|
||||||
^cloud_platform_exoscale/|
|
^cloud_platform_exoscale/|
|
||||||
^cloud_platform_ovh/|
|
^cloud_platform_ovh/|
|
||||||
^monitoring_log_requests/|
|
|
||||||
^monitoring_statsd/|
|
^monitoring_statsd/|
|
||||||
^test_base_fileurl_field/|
|
^test_base_fileurl_field/|
|
||||||
# END NOT INSTALLABLE ADDONS
|
# END NOT INSTALLABLE ADDONS
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import logging
|
|||||||
import time
|
import time
|
||||||
|
|
||||||
from odoo import models
|
from odoo import models
|
||||||
from odoo.http import request as http_request
|
from odoo.http import Response, request as http_request
|
||||||
from odoo.tools.config import config
|
from odoo.tools.config import config
|
||||||
|
|
||||||
_logger = logging.getLogger("monitoring.http.requests")
|
_logger = logging.getLogger("monitoring.http.requests")
|
||||||
@@ -30,7 +30,7 @@ class IrHttp(models.AbstractModel):
|
|||||||
@classmethod
|
@classmethod
|
||||||
def _monitoring_blacklist(cls, request):
|
def _monitoring_blacklist(cls, request):
|
||||||
path_info = request.httprequest.environ.get("PATH_INFO")
|
path_info = request.httprequest.environ.get("PATH_INFO")
|
||||||
if path_info.startswith("/longpolling/"):
|
if path_info.startswith(("/longpolling/", "/websocket")):
|
||||||
return True
|
return True
|
||||||
return False
|
return False
|
||||||
|
|
||||||
@@ -62,8 +62,10 @@ class IrHttp(models.AbstractModel):
|
|||||||
# response things
|
# response things
|
||||||
"response_status_code": None,
|
"response_status_code": None,
|
||||||
}
|
}
|
||||||
if hasattr(request, "status_code"):
|
if isinstance(response, Response) and hasattr(response, "status_code"):
|
||||||
info["status_code"] = response.status_code
|
info["response_status_code"] = response.status_code
|
||||||
|
else:
|
||||||
|
info["response_status_code"] = 200
|
||||||
if hasattr(request, "session"):
|
if hasattr(request, "session"):
|
||||||
info.update(
|
info.update(
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -0,0 +1 @@
|
|||||||
|
../../../../monitoring_log_requests
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
import setuptools
|
||||||
|
|
||||||
|
setuptools.setup(
|
||||||
|
setup_requires=['setuptools-odoo'],
|
||||||
|
odoo_addon=True,
|
||||||
|
)
|
||||||
Reference in New Issue
Block a user