mirror of
https://github.com/camptocamp/odoo-cloud-platform.git
synced 2026-06-24 16:48:36 +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/|
|
||||
^cloud_platform_exoscale/|
|
||||
^cloud_platform_ovh/|
|
||||
^monitoring_log_requests/|
|
||||
^monitoring_statsd/|
|
||||
^test_base_fileurl_field/|
|
||||
# END NOT INSTALLABLE ADDONS
|
||||
|
||||
@@ -6,7 +6,7 @@ import logging
|
||||
import time
|
||||
|
||||
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
|
||||
|
||||
_logger = logging.getLogger("monitoring.http.requests")
|
||||
@@ -30,7 +30,7 @@ class IrHttp(models.AbstractModel):
|
||||
@classmethod
|
||||
def _monitoring_blacklist(cls, request):
|
||||
path_info = request.httprequest.environ.get("PATH_INFO")
|
||||
if path_info.startswith("/longpolling/"):
|
||||
if path_info.startswith(("/longpolling/", "/websocket")):
|
||||
return True
|
||||
return False
|
||||
|
||||
@@ -62,8 +62,10 @@ class IrHttp(models.AbstractModel):
|
||||
# response things
|
||||
"response_status_code": None,
|
||||
}
|
||||
if hasattr(request, "status_code"):
|
||||
info["status_code"] = response.status_code
|
||||
if isinstance(response, Response) and hasattr(response, "status_code"):
|
||||
info["response_status_code"] = response.status_code
|
||||
else:
|
||||
info["response_status_code"] = 200
|
||||
if hasattr(request, "session"):
|
||||
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