@nosana/node 1.1.26-rc → 1.1.27
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/package.json +1 -1
- package/dist/src/NodeManager/node/task/TaskManager.d.ts +2 -1
- package/dist/src/NodeManager/node/task/TaskManager.js +10 -3
- package/dist/src/NodeManager/node/task/operations/stopAllTaskManagerOperations.d.ts +11 -7
- package/dist/src/NodeManager/node/task/operations/stopAllTaskManagerOperations.js +11 -7
- package/npm-shrinkwrap.json +2 -2
- package/package.json +1 -1
package/dist/package.json
CHANGED
|
@@ -281,7 +281,8 @@ export default class TaskManager {
|
|
|
281
281
|
* - Sets status to 'running' and updates the repository with start time.
|
|
282
282
|
* - Iterates through execution groups and runs each op concurrently.
|
|
283
283
|
* - Uses a dynamic while-loop to ensure all ops (including restarts) finish before advancing.
|
|
284
|
-
* - After all groups finish,
|
|
284
|
+
* - After all groups finish, sets the final flow status: 'failed' if any op
|
|
285
|
+
* failed, 'success' otherwise (including stopped/expired jobs).
|
|
285
286
|
* - On any uncaught failure, marks the flow as 'failed' with end time.
|
|
286
287
|
*/
|
|
287
288
|
start(): Promise<void>;
|
|
@@ -270,7 +270,8 @@ export default class TaskManager {
|
|
|
270
270
|
* - Sets status to 'running' and updates the repository with start time.
|
|
271
271
|
* - Iterates through execution groups and runs each op concurrently.
|
|
272
272
|
* - Uses a dynamic while-loop to ensure all ops (including restarts) finish before advancing.
|
|
273
|
-
* - After all groups finish,
|
|
273
|
+
* - After all groups finish, sets the final flow status: 'failed' if any op
|
|
274
|
+
* failed, 'success' otherwise (including stopped/expired jobs).
|
|
274
275
|
* - On any uncaught failure, marks the flow as 'failed' with end time.
|
|
275
276
|
*/
|
|
276
277
|
async start() {
|
|
@@ -359,8 +360,14 @@ export default class TaskManager {
|
|
|
359
360
|
});
|
|
360
361
|
}
|
|
361
362
|
}
|
|
362
|
-
//
|
|
363
|
-
|
|
363
|
+
// The final status only reflects the workload outcome: 'failed' if any
|
|
364
|
+
// operation failed, 'success' otherwise. How the job ended (stopped,
|
|
365
|
+
// expired) is tracked in the op statuses/diagnostics, so
|
|
366
|
+
// ops that were merely stopped don't fail the job.
|
|
367
|
+
const hasFailedOp = this.repository
|
|
368
|
+
.getFlowState(this.job)
|
|
369
|
+
.opStates.some((opState) => opState.status === Statuses.FAILED);
|
|
370
|
+
this.status = hasFailedOp ? Statuses.FAILED : Statuses.SUCCESS;
|
|
364
371
|
this.repository.updateflowState(this.job, {
|
|
365
372
|
status: this.status,
|
|
366
373
|
endTime: Date.now(),
|
|
@@ -7,15 +7,19 @@ import TaskManager, { StopReason } from '../TaskManager.js';
|
|
|
7
7
|
* - Lifecycle shutdown for any running ops
|
|
8
8
|
* - A consistent status applied to the flow and all ops
|
|
9
9
|
*
|
|
10
|
-
* The stop reason determines what status each op
|
|
10
|
+
* The stop reason determines what status each op will be marked with.
|
|
11
11
|
*
|
|
12
|
-
* | Reason | Ops Status |
|
|
13
|
-
*
|
|
14
|
-
* | expired | success |
|
|
15
|
-
* | stopped | stopped |
|
|
16
|
-
* | quit | failed |
|
|
17
|
-
* | unknown | failed |
|
|
12
|
+
* | Reason | Ops Status |
|
|
13
|
+
* |----------|------------|
|
|
14
|
+
* | expired | success |
|
|
15
|
+
* | stopped | stopped |
|
|
16
|
+
* | quit | failed |
|
|
17
|
+
* | unknown | failed |
|
|
18
18
|
*
|
|
19
19
|
* `getStatus()` is used internally to apply the correct status values.
|
|
20
|
+
*
|
|
21
|
+
* The flow status set here is transient: the final result status is derived
|
|
22
|
+
* from the op statuses when `start()` completes — 'failed' if any op failed,
|
|
23
|
+
* 'success' otherwise.
|
|
20
24
|
*/
|
|
21
25
|
export declare function stopAllTaskManagerOperations(this: TaskManager, reason: StopReason): void;
|
|
@@ -7,16 +7,20 @@ import { OperationProgressStatuses, } from '../TaskManager.js';
|
|
|
7
7
|
* - Lifecycle shutdown for any running ops
|
|
8
8
|
* - A consistent status applied to the flow and all ops
|
|
9
9
|
*
|
|
10
|
-
* The stop reason determines what status each op
|
|
10
|
+
* The stop reason determines what status each op will be marked with.
|
|
11
11
|
*
|
|
12
|
-
* | Reason | Ops Status |
|
|
13
|
-
*
|
|
14
|
-
* | expired | success |
|
|
15
|
-
* | stopped | stopped |
|
|
16
|
-
* | quit | failed |
|
|
17
|
-
* | unknown | failed |
|
|
12
|
+
* | Reason | Ops Status |
|
|
13
|
+
* |----------|------------|
|
|
14
|
+
* | expired | success |
|
|
15
|
+
* | stopped | stopped |
|
|
16
|
+
* | quit | failed |
|
|
17
|
+
* | unknown | failed |
|
|
18
18
|
*
|
|
19
19
|
* `getStatus()` is used internally to apply the correct status values.
|
|
20
|
+
*
|
|
21
|
+
* The flow status set here is transient: the final result status is derived
|
|
22
|
+
* from the op statuses when `start()` completes — 'failed' if any op failed,
|
|
23
|
+
* 'success' otherwise.
|
|
20
24
|
*/
|
|
21
25
|
export function stopAllTaskManagerOperations(reason) {
|
|
22
26
|
/**
|
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nosana/node",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.27",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "@nosana/node",
|
|
9
|
-
"version": "1.1.
|
|
9
|
+
"version": "1.1.27",
|
|
10
10
|
"license": "ISC",
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@coral-xyz/anchor": "^0.28.1-beta.1",
|