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:
Kelly
2025-12-13 00:30:01 -07:00
parent 656b00332e
commit c16c3083b1
2 changed files with 10 additions and 1 deletions

View File

@@ -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)
// ==========================================

View File

@@ -771,7 +771,7 @@ export default function TasksDashboard() {
api.getTaskCapacity(),
api.getTaskPoolStatus(),
api.getTaskSchedules(),
api.getWorkers().catch(() => ({ workers: [] })),
api.getWorkerRegistry().catch(() => ({ workers: [] })),
]);
setTasks(tasksRes.tasks || []);