fix(cannaiq): Fix TasksDashboard worker API call
- Add getWorkerRegistry() method to API client - Change TasksDashboard to use getWorkerRegistry() instead of non-existent getWorkers() 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -2989,6 +2989,15 @@ class ApiClient {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Worker Registry API
|
||||||
|
async getWorkerRegistry() {
|
||||||
|
return this.request<{
|
||||||
|
success: boolean;
|
||||||
|
workers: Array<{ worker_id: string; friendly_name: string; status: string }>;
|
||||||
|
summary: { active_count: number; idle_count: number; offline_count: number; total_count: number };
|
||||||
|
}>('/api/worker-registry/workers');
|
||||||
|
}
|
||||||
|
|
||||||
// ==========================================
|
// ==========================================
|
||||||
// Task Schedules API (recurring task definitions)
|
// Task Schedules API (recurring task definitions)
|
||||||
// ==========================================
|
// ==========================================
|
||||||
|
|||||||
@@ -771,7 +771,7 @@ export default function TasksDashboard() {
|
|||||||
api.getTaskCapacity(),
|
api.getTaskCapacity(),
|
||||||
api.getTaskPoolStatus(),
|
api.getTaskPoolStatus(),
|
||||||
api.getTaskSchedules(),
|
api.getTaskSchedules(),
|
||||||
api.getWorkers().catch(() => ({ workers: [] })),
|
api.getWorkerRegistry().catch(() => ({ workers: [] })),
|
||||||
]);
|
]);
|
||||||
|
|
||||||
setTasks(tasksRes.tasks || []);
|
setTasks(tasksRes.tasks || []);
|
||||||
|
|||||||
Reference in New Issue
Block a user