Skip to content

Commit df4ee81

Browse files
committed
surface return result in completed status
1 parent 10d5ce2 commit df4ee81

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/client/index.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import type {
2+
RunResult,
23
WorkpoolOptions,
34
WorkpoolRetryOptions,
45
} from "@convex-dev/workpool";
@@ -76,7 +77,7 @@ export type WorkflowDefinition<
7677

7778
export type WorkflowStatus =
7879
| { type: "inProgress"; running: OpaqueIds<Step>[] }
79-
| { type: "completed" }
80+
| { type: "completed"; result: unknown }
8081
| { type: "canceled" }
8182
| { type: "failed"; error: string };
8283

@@ -185,7 +186,7 @@ export class WorkflowManager {
185186
case "failed":
186187
return { type: "failed", error: workflow.runResult.error };
187188
case "success":
188-
return { type: "completed" };
189+
return { type: "completed", result: workflow.runResult.returnValue };
189190
}
190191
}
191192

0 commit comments

Comments
 (0)