mirror of
https://github.com/camptocamp/odoo-cloud-platform.git
synced 2026-06-23 18:04:34 +00:00
Change CI to GitHub actions
Use copier template from oca/oca-addons-repo-template Apply linting
This commit is contained in:
@@ -13,7 +13,7 @@
|
||||
"web",
|
||||
"server_environment",
|
||||
],
|
||||
"website": "http://www.camptocamp.com",
|
||||
"website": "https://github.com/camptocamp/odoo-cloud-platform",
|
||||
"data": [],
|
||||
"external_dependencies": {
|
||||
"python": ["prometheus_client"],
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
# Copyright 2016-2021 Camptocamp SA
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html)
|
||||
|
||||
from odoo.http import Controller, route
|
||||
from prometheus_client import generate_latest
|
||||
|
||||
from odoo.http import Controller, route
|
||||
|
||||
|
||||
class PrometheusController(Controller):
|
||||
@route('/metrics', auth='public')
|
||||
@route("/metrics", auth="public")
|
||||
def metrics(self):
|
||||
return generate_latest()
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
# Copyright 2016-2021 Camptocamp SA
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html)
|
||||
|
||||
from prometheus_client import Counter, Summary
|
||||
|
||||
from odoo import models
|
||||
from odoo.http import request
|
||||
from prometheus_client import Summary, Counter
|
||||
|
||||
|
||||
REQUEST_TIME = Summary(
|
||||
"request_latency_sec", "Request response time in sec", ["query_type"]
|
||||
|
||||
Reference in New Issue
Block a user