@aikirun/worker 0.23.0 → 0.23.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +3 -2
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -726,12 +726,13 @@ var WorkflowRunHandleImpl = class {
|
|
|
726
726
|
const delayMs = options?.interval ? toMilliseconds(options.interval) : 1e3;
|
|
727
727
|
const maxAttempts = options?.timeout ? Math.ceil(toMilliseconds(options.timeout) / delayMs) : Number.POSITIVE_INFINITY;
|
|
728
728
|
const retryStrategy = { type: "fixed", maxAttempts, delayMs };
|
|
729
|
-
|
|
729
|
+
let afterStateTransitionId = this._run.stateTransitionId;
|
|
730
730
|
const hasTerminated = async () => {
|
|
731
|
-
const { terminated } = await this.api.workflowRun.hasTerminatedV1({
|
|
731
|
+
const { terminated, latestStateTransitionId } = await this.api.workflowRun.hasTerminatedV1({
|
|
732
732
|
id: this._run.id,
|
|
733
733
|
afterStateTransitionId
|
|
734
734
|
});
|
|
735
|
+
afterStateTransitionId = latestStateTransitionId;
|
|
735
736
|
return terminated;
|
|
736
737
|
};
|
|
737
738
|
const shouldRetryOnResult = async (terminated) => !terminated;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aikirun/worker",
|
|
3
|
-
"version": "0.23.
|
|
3
|
+
"version": "0.23.1",
|
|
4
4
|
"description": "Worker SDK for Aiki - execute workflows and tasks with durable state management and automatic recovery",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -18,9 +18,9 @@
|
|
|
18
18
|
"build": "tsup"
|
|
19
19
|
},
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@aikirun/types": "0.23.
|
|
22
|
-
"@aikirun/client": "0.23.
|
|
23
|
-
"@aikirun/workflow": "0.23.
|
|
21
|
+
"@aikirun/types": "0.23.1",
|
|
22
|
+
"@aikirun/client": "0.23.1",
|
|
23
|
+
"@aikirun/workflow": "0.23.1",
|
|
24
24
|
"ulidx": "^2.4.1"
|
|
25
25
|
},
|
|
26
26
|
"publishConfig": {
|