Add monitoring_statsd in cloud_platform

This commit is contained in:
Guewen Baconnier
2016-11-04 10:30:10 +01:00
parent d53ef3de37
commit 65e9bad4e5
4 changed files with 29 additions and 10 deletions
+6
View File
@@ -99,6 +99,11 @@ class CloudPlatform(models.AbstractModel):
", we got: '%s'" % (prefix,)
)
@api.model
def _check_metrics(self, environment_name):
if environment_name == 'prod':
assert is_true(os.environ.get('ODOO_STATSD'))
@api.model
def check(self):
if is_true(os.environ.get('ODOO_CLOUD_PLATFORM_UNSAFE')):
@@ -117,6 +122,7 @@ class CloudPlatform(models.AbstractModel):
environment_name = config['running_env']
self._check_s3(environment_name)
self._check_redis(environment_name)
self._check_metrics(environment_name)
@api.cr
def _register_hook(self, cr):