diff --git a/.copier-answers.yml b/.copier-answers.yml index 79e397d..bfe4b8d 100644 --- a/.copier-answers.yml +++ b/.copier-answers.yml @@ -17,8 +17,7 @@ odoo_version: 18.0 org_name: Camptocamp org_slug: camptocamp rebel_module_groups: -- attachment_azure,cloud_platform_azure -repo_description: 'Tools to run Odoo on a cloud platform. Mainly Azure at the moment. ' +repo_description: 'Tools to run Odoo on a cloud platform.' repo_name: Odoo Cloud Addons repo_slug: odoo-cloud-platform repo_website: https://github.com/camptocamp/odoo-cloud-platform diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 17f7f3e..74ea30a 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -36,17 +36,8 @@ jobs: matrix: include: - container: ghcr.io/oca/oca-ci/py3.10-odoo18.0:latest - include: "attachment_azure,cloud_platform_azure" name: test with Odoo - container: ghcr.io/oca/oca-ci/py3.10-ocb18.0:latest - include: "attachment_azure,cloud_platform_azure" - name: test with OCB - makepot: "false" - - container: ghcr.io/oca/oca-ci/py3.10-odoo18.0:latest - exclude: "attachment_azure,cloud_platform_azure" - name: test with Odoo - - container: ghcr.io/oca/oca-ci/py3.10-ocb18.0:latest - exclude: "attachment_azure,cloud_platform_azure" name: test with OCB makepot: "false" services: diff --git a/cloud_platform/models/cloud_platform.py b/cloud_platform/models/cloud_platform.py index 02cd67c..8385c1c 100644 --- a/cloud_platform/models/cloud_platform.py +++ b/cloud_platform/models/cloud_platform.py @@ -4,7 +4,6 @@ import logging import os import re -from collections import namedtuple from odoo import api, models from odoo.tools.config import config diff --git a/requirements.txt b/requirements.txt index d99c37b..a977136 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,6 +1,4 @@ # generated from manifests external_dependencies -azure-identity -azure-storage-blob prometheus_client python-json-logger redis diff --git a/session_redis/http.py b/session_redis/http.py index 634fdbb..bb80b9d 100644 --- a/session_redis/http.py +++ b/session_redis/http.py @@ -44,6 +44,8 @@ anon_expiration = os.getenv("ODOO_SESSION_REDIS_EXPIRATION_ANONYMOUS") ssl = os.getenv("ODOO_SESSION_REDIS_SSL", "1") ssl_cert_reqs = os.getenv("ODOO_SESSION_REDIS_SSL_CERT_REQS", "1") redis_cluster = os.getenv("ODOO_SESSION_REDIS_CLUSTER", "0") + + @lazy_property def session_store(self): if sentinel_host: @@ -57,12 +59,16 @@ def session_store(self): port=port, password=password, ssl=is_true(ssl), - ssl_cert_reqs=is_true(ssl_cert_reqs)) + ssl_cert_reqs=is_true(ssl_cert_reqs), + ) else: redis_client = redis.Redis( - host=host, port=port, password=password, + host=host, + port=port, + password=password, ssl=is_true(ssl), - ssl_cert_reqs=is_true(ssl_cert_reqs)) + ssl_cert_reqs=is_true(ssl_cert_reqs), + ) return RedisSessionStore( redis=redis_client, prefix=prefix,