Skip to content

Commit

Permalink
fix: data from task completion was not saved before completion event …
Browse files Browse the repository at this point in the history
…fired
  • Loading branch information
sroussey committed Jan 30, 2025
1 parent d0ac9ca commit b4b5a0c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/ai/src/task/base/JobQueueLlmTask.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@ export class JobQueueLlmTask extends JobQueueTask {
console.error(err);
return {};
}
this.emit("complete");
this.runOutputData = results ?? {};
this.runOutputData = await this.runReactive();
this.emit("complete");
return this.runOutputData;
}
async runReactive(): Promise<TaskOutput> {
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/task/base/Task.ts
Original file line number Diff line number Diff line change
Expand Up @@ -298,8 +298,8 @@ export abstract class TaskBase {
}
this.emit("start");
const result = await this.runReactive();
this.emit("complete");
this.runOutputData = result;
this.emit("complete");
return result;
}
/**
Expand Down

0 comments on commit b4b5a0c

Please sign in to comment.