fix: remove "obico" from the suffix_blacklist so that it can discover its own instances. (#551)

Signed-off-by: Kenneth Jiang <kenneth.jiang@gmail.com>
This commit is contained in:
Kenneth Jiang
2024-09-29 07:41:20 -07:00
committed by GitHub
parent 4138c71920
commit 6e1bffa975
2 changed files with 5 additions and 3 deletions

View File

@@ -17,7 +17,7 @@ from core.instance_manager.base_instance import SUFFIX_BLACKLIST
from utils.instance_type import InstanceType
def get_instances(instance_type: type) -> List[InstanceType]:
def get_instances(instance_type: type, suffix_blacklist: List[str] = SUFFIX_BLACKLIST) -> List[InstanceType]:
from utils.common import convert_camelcase_to_kebabcase
if not isinstance(instance_type, type):
@@ -30,7 +30,7 @@ def get_instances(instance_type: type) -> List[InstanceType]:
Path(SYSTEMD, service)
for service in SYSTEMD.iterdir()
if pattern.search(service.name)
and not any(s in service.name for s in SUFFIX_BLACKLIST)
and not any(s in service.name for s in suffix_blacklist)
]
instance_list = [