refactor: Update according to Chapter 2.1.3.2 of RFC 116

This commit is contained in:
莘权 马 2023-11-08 22:01:55 +08:00
parent d9939f437a
commit d232725a29

View file

@ -170,17 +170,9 @@ class Role:
return self._setting.name
@property
def subscribed_tags(self) -> Set:
def subscription(self) -> Set:
"""The labels for messages to be consumed by the Role object."""
if self._rc.watch:
return self._rc.watch
return {
self.name,
get_object_name(self),
self.profile,
f"{self.name}({self.profile})",
f"{self.name}({get_object_name(self)})",
}
return self._subscription
def _get_prefix(self):
"""Get the role prefix"""