fix: dependencies and deprecated code (#390)

This commit is contained in:
Vincent Renaville
2022-11-04 14:34:29 +01:00
committed by GitHub
co-authored by GitHub
parent 14cab08024
commit dddd130e79
14 changed files with 224 additions and 111 deletions
+4 -4
View File
@@ -16,15 +16,15 @@ class IrHttp(models.AbstractModel):
_inherit = "ir.http"
@classmethod
def _dispatch(cls):
def _dispatch(cls, endpoint):
path_info = request.httprequest.environ.get("PATH_INFO")
if path_info.startswith("/longpolling/"):
LONGPOLLING_COUNT.inc()
return super()._dispatch()
return super()._dispatch(endpoint)
if path_info.startswith("/metrics"):
return super()._dispatch()
return super()._dispatch(endpoint)
if path_info.startswith("/web/static"):
label = "assets"
@@ -35,6 +35,6 @@ class IrHttp(models.AbstractModel):
res = None
with REQUEST_TIME.labels(label).time():
res = super()._dispatch()
res = super()._dispatch(endpoint)
return res