mirror of
https://github.com/camptocamp/odoo-cloud-platform.git
synced 2026-06-24 08:47:40 +00:00
Relax rules for the redis prefix
If we run 2 instances with the 'integration' server_env, we want 2 the ability to use different prefixes.
This commit is contained in:
@@ -98,10 +98,9 @@ class CloudPlatform(models.AbstractModel):
|
|||||||
assert os.environ.get('ODOO_SESSION_REDIS_HOST')
|
assert os.environ.get('ODOO_SESSION_REDIS_HOST')
|
||||||
assert os.environ.get('ODOO_SESSION_REDIS_PREFIX')
|
assert os.environ.get('ODOO_SESSION_REDIS_PREFIX')
|
||||||
prefix = os.environ['ODOO_SESSION_REDIS_PREFIX']
|
prefix = os.environ['ODOO_SESSION_REDIS_PREFIX']
|
||||||
if environment_name in ('prod', 'integration', 'test'):
|
assert re.match(r'[a-z]+-odoo-[a-z]+', prefix), (
|
||||||
assert re.match(r'[a-z]+-odoo-%s' % (environment_name,), prefix), (
|
"ODOO_SESSION_REDIS_PREFIX should match '<client>-odoo-<env>'"
|
||||||
"ODOO_SESSION_REDIS_PREFIX should match '<client>-odoo-%s', "
|
", we got: '%s'" % (prefix,)
|
||||||
"we got: '%s'" % (environment_name, prefix)
|
|
||||||
)
|
)
|
||||||
|
|
||||||
@api.model
|
@api.model
|
||||||
|
|||||||
Reference in New Issue
Block a user