Add replication setup wizard and site-level sync dashboard for site registry

This commit is contained in:
2026-01-26 21:39:47 +08:00
parent 62c36f7a6c
commit 6b715851b9
4 changed files with 492 additions and 1 deletions

View File

@@ -318,6 +318,9 @@ class ReplicationManager:
def get_rule(self, bucket_name: str) -> Optional[ReplicationRule]:
return self._rules.get(bucket_name)
def list_rules(self) -> List[ReplicationRule]:
return list(self._rules.values())
def set_rule(self, rule: ReplicationRule) -> None:
old_rule = self._rules.get(rule.bucket_name)
was_all_mode = old_rule and old_rule.mode == REPLICATION_MODE_ALL if old_rule else False