feat(HAI-001): wire status updates in executor
This commit is contained in:
@@ -75,6 +75,7 @@ export class TaskExecutor {
|
||||
console.log(`[executor] Starting ${task.id}: ${task.title}`);
|
||||
|
||||
try {
|
||||
await this.store.setStatus(task.id, "executing");
|
||||
// Check dependencies
|
||||
const allTasks = await this.store.listTasks();
|
||||
const unmetDeps = task.dependencies.filter((depId) => {
|
||||
@@ -146,6 +147,7 @@ export class TaskExecutor {
|
||||
}
|
||||
} catch (err: any) {
|
||||
console.error(`[executor] ✗ ${task.id} execution failed:`, err.message);
|
||||
await this.store.setStatus(task.id, "idle");
|
||||
this.options.onError?.(task, err);
|
||||
} finally {
|
||||
this.executing.delete(task.id);
|
||||
|
||||
Reference in New Issue
Block a user