fix: Handle spawn and branch failures gracefully in dispatch cycle
Wrap agentManager.spawn() in try/catch — on failure, block the task instead of crashing the entire dispatch cycle. Move phase status update to after branch creation succeeds — on branch failure, block the phase and skip task queuing. Fix statement-breakpoint markers in migration 0020 to use separate lines.
This commit is contained in:
@@ -9,7 +9,8 @@ CREATE TABLE `change_sets` (
|
||||
`status` text NOT NULL DEFAULT 'applied',
|
||||
`reverted_at` integer,
|
||||
`created_at` integer NOT NULL
|
||||
);--> statement-breakpoint
|
||||
);
|
||||
--> statement-breakpoint
|
||||
CREATE TABLE `change_set_entries` (
|
||||
`id` text PRIMARY KEY NOT NULL,
|
||||
`change_set_id` text NOT NULL REFERENCES `change_sets`(`id`) ON DELETE CASCADE,
|
||||
@@ -20,6 +21,8 @@ CREATE TABLE `change_set_entries` (
|
||||
`new_state` text,
|
||||
`sort_order` integer NOT NULL DEFAULT 0,
|
||||
`created_at` integer NOT NULL
|
||||
);--> statement-breakpoint
|
||||
CREATE INDEX `change_sets_initiative_id_idx` ON `change_sets`(`initiative_id`);--> statement-breakpoint
|
||||
);
|
||||
--> statement-breakpoint
|
||||
CREATE INDEX `change_sets_initiative_id_idx` ON `change_sets`(`initiative_id`);
|
||||
--> statement-breakpoint
|
||||
CREATE INDEX `change_set_entries_change_set_id_idx` ON `change_set_entries`(`change_set_id`);
|
||||
|
||||
Reference in New Issue
Block a user