Improve user delete flow
This commit is contained in:
@@ -140,7 +140,7 @@ class AuthTrainingServiceClient(BaseServiceClient):
|
||||
"""Cancel all active training jobs for a tenant"""
|
||||
try:
|
||||
data = {"tenant_id": tenant_id}
|
||||
return await self.post("jobs/cancel-tenant", data=data)
|
||||
return await self.post("/tenants/{tenant_id}/training/jobs/cancel", data=data)
|
||||
except Exception as e:
|
||||
logger.error("Failed to cancel tenant training jobs",
|
||||
tenant_id=tenant_id,
|
||||
@@ -151,7 +151,7 @@ class AuthTrainingServiceClient(BaseServiceClient):
|
||||
"""Get all active training jobs for a tenant"""
|
||||
try:
|
||||
params = {"status": "running,queued,pending", "tenant_id": tenant_id}
|
||||
result = await self.get("jobs", params=params)
|
||||
result = await self.get("/tenants/{tenant_id}/training/jobs/active", params=params)
|
||||
return result.get("jobs", []) if result else []
|
||||
except Exception as e:
|
||||
logger.error("Failed to get tenant active jobs",
|
||||
|
||||
Reference in New Issue
Block a user