Spaces:
Running
Running
chore: MT - Listing all tenants at startup
Browse files
huggingface_overlay/start_HuggingFace_multi_tenant.py
CHANGED
|
@@ -647,8 +647,14 @@ def start_all_active_tenant_orchestrators():
|
|
| 647 |
logger.debug(f"start_all_active_tenant_orchestrators")
|
| 648 |
with orm.Session(bind=tenants_db_engine) as session:
|
| 649 |
for tenant_row in session.scalars(
|
| 650 |
-
sqlalchemy.select(TenantRow).where(TenantRow.orchestrator_active)
|
|
|
|
| 651 |
):
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 652 |
try:
|
| 653 |
# TODO: Respect the orchestrator_config
|
| 654 |
_ = get_or_start_orchestrator(
|
|
|
|
| 647 |
logger.debug(f"start_all_active_tenant_orchestrators")
|
| 648 |
with orm.Session(bind=tenants_db_engine) as session:
|
| 649 |
for tenant_row in session.scalars(
|
| 650 |
+
# sqlalchemy.select(TenantRow).where(TenantRow.orchestrator_active)
|
| 651 |
+
sqlalchemy.select(TenantRow)
|
| 652 |
):
|
| 653 |
+
logger.debug(
|
| 654 |
+
f"start_all_active_tenant_orchestrators: Tenant found: id={tenant_row.id}, name={tenant_row.name}, active={tenant_row.orchestrator_active}"
|
| 655 |
+
)
|
| 656 |
+
if not tenant_row.orchestrator_active:
|
| 657 |
+
continue
|
| 658 |
try:
|
| 659 |
# TODO: Respect the orchestrator_config
|
| 660 |
_ = get_or_start_orchestrator(
|