Skip to content

Commit

Permalink
Consider master as always valid
Browse files Browse the repository at this point in the history
  • Loading branch information
sbrunner committed Feb 26, 2025
1 parent 68a83fd commit 1f86180
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
5 changes: 4 additions & 1 deletion app/shared_config_manager/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ def _watch_source():
try:
for key, source in registry.get_sources().items():
try:
if source.is_master():
continue

slaves = slave_status.get_source_status(id_=key)
need_refresh = False
hash_ = ""
Expand All @@ -48,7 +51,7 @@ def _watch_source():
if "hash" not in slave:
need_refresh = True
_LOG.warning(
"No hash in the slave '%s ' status for source '%s' -> refresh.",
"No hash in the slave '%s' status for source '%s' -> refresh.",
slave.get("hostname"),
key,
)
Expand Down
3 changes: 3 additions & 0 deletions app/shared_config_manager/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ def _is_valid(source: BaseSource) -> bool:
if source is None:
return False

if source.is_master():
return True

slaves = slave_status.get_source_status(id_=source.get_id())
if slaves is None:
return True
Expand Down

0 comments on commit 1f86180

Please sign in to comment.