X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=installers%2Fcharm%2Fosm-ro%2Fsrc%2Fcharm.py;h=c19281e71492556176193ebe8058f25959a6a278;hb=5478dd84ac1982c969a812f164e6e907701508f0;hp=8b45191448f35f563280737348daef1fc0202e13;hpb=bd32485a35589a6ebb7dba837d4c9bfe1b78de26;p=osm%2Fdevops.git diff --git a/installers/charm/osm-ro/src/charm.py b/installers/charm/osm-ro/src/charm.py index 8b451914..c19281e7 100755 --- a/installers/charm/osm-ro/src/charm.py +++ b/installers/charm/osm-ro/src/charm.py @@ -203,6 +203,12 @@ class OsmRoCharm(CharmBase): ]: raise CharmError("invalid value for log-level option") + refresh_period = self.config.get("period_refresh_active") + if refresh_period and refresh_period < 60 and refresh_period != -1: + raise ValueError( + "Refresh Period is too tight, insert >= 60 seconds or disable using -1" + ) + def _check_relations(self) -> None: """Validate charm relations. @@ -290,6 +296,8 @@ class OsmRoCharm(CharmBase): "OSMRO_STORAGE_PATH": "/app/storage", "OSMRO_STORAGE_COLLECTION": "files", "OSMRO_STORAGE_URI": self.mongodb_client.connection_string, + "OSMRO_PERIOD_REFRESH_ACTIVE": self.config.get("period_refresh_active") + or 60, }, } },