Loading cloudcontrol/common/tql/db/tag.py +2 −1 Original line number Diff line number Diff line Loading @@ -107,7 +107,8 @@ class CallbackTag(BaseTag, StaticTagInterface): @property def value(self): if self.ttl is not None or self.ttl is None and self._cache_last_update is None: # Update the cached value if it has expired or not retrieved yet: if self.ttl is not None or (self.ttl is None and self._cache_last_update is None): if self._cache_last_update is None or datetime.now() - self._cache_last_update > self.ttl: self.value = str(self.callback(**self._callback_extra)) return self._cache_value Loading Loading
cloudcontrol/common/tql/db/tag.py +2 −1 Original line number Diff line number Diff line Loading @@ -107,7 +107,8 @@ class CallbackTag(BaseTag, StaticTagInterface): @property def value(self): if self.ttl is not None or self.ttl is None and self._cache_last_update is None: # Update the cached value if it has expired or not retrieved yet: if self.ttl is not None or (self.ttl is None and self._cache_last_update is None): if self._cache_last_update is None or datetime.now() - self._cache_last_update > self.ttl: self.value = str(self.callback(**self._callback_extra)) return self._cache_value Loading