limit router data special case to redis

This commit is contained in:
Benedikt Bartscher 2024-12-06 01:57:48 +01:00
parent bc33b8c96d
commit e6b356fb67
No known key found for this signature in database

View File

@ -1329,6 +1329,12 @@ class BaseState(Base, ABC, extra=pydantic.Extra.allow):
if name in self.vars or name in self._computed_var_dependencies:
self.dirty_vars.add(name)
self._mark_dirty()
return
# For now, handle router_data updates as a special case if using redis.
if name == constants.ROUTER_DATA and get_config().redis_url:
self.dirty_vars.add(name)
self._mark_dirty()
def reset(self):
"""Reset all the base vars to their default values."""