windmill-client 1.394.2 → 1.394.4
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/client.d.ts +1 -1
- package/dist/client.js +10 -6
- package/dist/core/OpenAPI.js +1 -1
- package/package.json +1 -1
package/dist/client.d.ts
CHANGED
|
@@ -31,7 +31,7 @@ export declare function getResult(jobId: string): Promise<any>;
|
|
|
31
31
|
export declare function getResultMaybe(jobId: string): Promise<any>;
|
|
32
32
|
export declare function task<P, T>(f: (_: P) => T): (_: P) => Promise<T>;
|
|
33
33
|
export declare function runScriptAsync(path: string | null, hash_: string | null, args: Record<string, any> | null, scheduledInSeconds?: number | null): Promise<string>;
|
|
34
|
-
export declare function runFlowAsync(path: string | null, args: Record<string, any> | null, scheduledInSeconds?: number | null,
|
|
34
|
+
export declare function runFlowAsync(path: string | null, args: Record<string, any> | null, scheduledInSeconds?: number | null, doNotTrackInParent?: boolean): Promise<string>;
|
|
35
35
|
/**
|
|
36
36
|
* Resolve a resource value in case the default value was picked because the input payload was undefined
|
|
37
37
|
* @param obj resource value or path of the resource under the format `$res:path`
|
package/dist/client.js
CHANGED
|
@@ -265,22 +265,26 @@ function runScriptAsync(path_1, hash_1, args_1) {
|
|
|
265
265
|
});
|
|
266
266
|
}
|
|
267
267
|
function runFlowAsync(path_1, args_1) {
|
|
268
|
-
return __awaiter(this, arguments, void 0, function* (path, args, scheduledInSeconds = null,
|
|
268
|
+
return __awaiter(this, arguments, void 0, function* (path, args, scheduledInSeconds = null,
|
|
269
|
+
// can only be set to false if this the job will be fully await and not concurrent with any other job
|
|
270
|
+
// as otherwise the child flow and its own child will store their state in the parent job which will
|
|
271
|
+
// lead to incorrectness and failures
|
|
272
|
+
doNotTrackInParent = true) {
|
|
269
273
|
// Create a script job and return its job id.
|
|
270
274
|
args = args || {};
|
|
271
275
|
const params = {};
|
|
272
276
|
if (scheduledInSeconds) {
|
|
273
277
|
params["scheduled_in_secs"] = scheduledInSeconds;
|
|
274
278
|
}
|
|
275
|
-
if (!
|
|
279
|
+
if (!doNotTrackInParent) {
|
|
276
280
|
let parentJobId = getEnv("WM_JOB_ID");
|
|
277
281
|
if (parentJobId !== undefined) {
|
|
278
282
|
params["parent_job"] = parentJobId;
|
|
279
283
|
}
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
+
let rootJobId = getEnv("WM_ROOT_FLOW_JOB_ID");
|
|
285
|
+
if (rootJobId != undefined && rootJobId != "") {
|
|
286
|
+
params["root_job"] = rootJobId;
|
|
287
|
+
}
|
|
284
288
|
}
|
|
285
289
|
let endpoint;
|
|
286
290
|
if (path) {
|
package/dist/core/OpenAPI.js
CHANGED