feat: add redis gateway protection and task recovery
This commit is contained in:
1 parent
cbc7317aa8
commit
473479fc4c
17 files changed
+272
-10
No files matched your search
@@ -200,6 +200,18 @@ class HttpCatalogClient {
|
||||
return payload.task
|
||||
}
|
||||
|
||||
async listTasks(apiKey: string, limit = 50) {
|
||||
const payload = await this.request<{ tasks: AsyncTaskResult[] }>(`/v1/tasks?limit=${Math.max(1, Math.min(limit, 100))}`, {
|
||||
headers: { Authorization: `Bearer ${apiKey}` },
|
||||
})
|
||||
return payload.tasks
|
||||
}
|
||||
|
||||
async listSessionTasks(limit = 50) {
|
||||
const payload = await this.request<{ tasks: AsyncTaskResult[] }>(`/api/tasks?limit=${Math.max(1, Math.min(limit, 100))}`)
|
||||
return payload.tasks
|
||||
}
|
||||
|
||||
async listAdminModels() {
|
||||
return this.request<{ models: CatalogModel[] }>('/api/admin/models')
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user