mirror of
https://github.com/camptocamp/odoo-cloud-platform.git
synced 2026-06-24 02:08:36 +00:00
Do not force metrics on production
This commit is contained in:
@@ -131,14 +131,6 @@ class CloudPlatform(models.AbstractModel):
|
|||||||
", we got: '%s'" % (prefix,)
|
", we got: '%s'" % (prefix,)
|
||||||
)
|
)
|
||||||
|
|
||||||
@api.model
|
|
||||||
def _check_metrics(self, environment_name):
|
|
||||||
if environment_name == 'prod':
|
|
||||||
assert is_true(os.environ.get('ODOO_STATSD')), (
|
|
||||||
"Statds metrics must be activated on prod instances."
|
|
||||||
"This is done by setting ODOO_STATSD=1."
|
|
||||||
)
|
|
||||||
|
|
||||||
@api.model
|
@api.model
|
||||||
def check(self):
|
def check(self):
|
||||||
if is_true(os.environ.get('ODOO_CLOUD_PLATFORM_UNSAFE')):
|
if is_true(os.environ.get('ODOO_CLOUD_PLATFORM_UNSAFE')):
|
||||||
@@ -157,7 +149,6 @@ class CloudPlatform(models.AbstractModel):
|
|||||||
environment_name = config['running_env']
|
environment_name = config['running_env']
|
||||||
self._check_s3(environment_name)
|
self._check_s3(environment_name)
|
||||||
self._check_redis(environment_name)
|
self._check_redis(environment_name)
|
||||||
self._check_metrics(environment_name)
|
|
||||||
|
|
||||||
@api.cr
|
@api.cr
|
||||||
def _register_hook(self, cr):
|
def _register_hook(self, cr):
|
||||||
|
|||||||
Reference in New Issue
Block a user