fix(agent-jobs): close maintenance jobs after decision
This commit is contained in:
1 parent
1e1435e656
commit
00f96a126e
3 files changed
+122
No files matched your search
@@ -1540,6 +1540,12 @@ export const applyMaintenanceDecision = mutation({
|
||||
}
|
||||
if (!job.threadId) return { success: true };
|
||||
const now = Date.now();
|
||||
await ctx.db.patch(args.jobId, {
|
||||
workspaceStatus: 'stopped',
|
||||
summary: args.summary,
|
||||
completedAt: job.completedAt ?? now,
|
||||
updatedAt: now,
|
||||
});
|
||||
const outcome =
|
||||
args.decision === 'sync'
|
||||
? 'sync_recommended'
|
||||
|
||||
Reference in new issue
Block a user