@io-orkes/conductor-javascript 0.0.12 → 0.9.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/README.md +29 -16
- package/dist/index.d.ts +151 -727
- package/dist/index.js +31 -621
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +30 -621
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
package/dist/index.mjs
CHANGED
|
@@ -20,6 +20,9 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
20
20
|
|
|
21
21
|
// src/task/TaskRunner.ts
|
|
22
22
|
var DEFAULT_ERROR_MESSAGE = "An unknown error occurred";
|
|
23
|
+
var MAX_RETRIES = 3;
|
|
24
|
+
var noopErrorHandler = (__error) => {
|
|
25
|
+
};
|
|
23
26
|
var noopLogger = {
|
|
24
27
|
debug: (...args) => {
|
|
25
28
|
},
|
|
@@ -33,7 +36,8 @@ var TaskRunner = class {
|
|
|
33
36
|
worker,
|
|
34
37
|
taskResource,
|
|
35
38
|
options,
|
|
36
|
-
logger = noopLogger
|
|
39
|
+
logger = noopLogger,
|
|
40
|
+
onError: errorHandler = noopErrorHandler
|
|
37
41
|
}) {
|
|
38
42
|
this.isPolling = false;
|
|
39
43
|
this.startPolling = () => {
|
|
@@ -58,27 +62,44 @@ var TaskRunner = class {
|
|
|
58
62
|
}
|
|
59
63
|
} catch (unknownError) {
|
|
60
64
|
this.handleUnknownError(unknownError);
|
|
65
|
+
this.errorHandler(unknownError);
|
|
61
66
|
}
|
|
62
67
|
await new Promise((r) => setTimeout(() => r(true), this.options.pollInterval));
|
|
63
68
|
}
|
|
64
69
|
};
|
|
70
|
+
this.updateTaskWithRetry = async (task, taskResult) => {
|
|
71
|
+
let retryCount = 0;
|
|
72
|
+
while (retryCount < MAX_RETRIES) {
|
|
73
|
+
try {
|
|
74
|
+
await this.taskResource.updateTask1(taskResult);
|
|
75
|
+
return;
|
|
76
|
+
} catch (error) {
|
|
77
|
+
this.errorHandler(error, task);
|
|
78
|
+
this.logger.error(`Error updating task ${taskResult.taskId} on retry ${retryCount}`, error);
|
|
79
|
+
retryCount++;
|
|
80
|
+
await new Promise((r) => setTimeout(() => r(true), retryCount * 10));
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
this.logger.error(`Unable to update task ${taskResult.taskId} after ${retryCount} retries`);
|
|
84
|
+
};
|
|
65
85
|
this.executeTask = async (task) => {
|
|
66
86
|
try {
|
|
67
87
|
const result = await this.worker.execute(task);
|
|
68
|
-
await this.
|
|
88
|
+
await this.updateTaskWithRetry(task, __spreadProps(__spreadValues({}, result), {
|
|
69
89
|
workflowInstanceId: task.workflowInstanceId,
|
|
70
90
|
taskId: task.taskId
|
|
71
91
|
}));
|
|
72
92
|
this.logger.debug(`Finished polling for task ${task.taskId}`);
|
|
73
93
|
} catch (error) {
|
|
74
|
-
this.
|
|
75
|
-
await this.taskResource.updateTask1({
|
|
94
|
+
await this.updateTaskWithRetry(task, {
|
|
76
95
|
workflowInstanceId: task.workflowInstanceId,
|
|
77
96
|
taskId: task.taskId,
|
|
78
97
|
reasonForIncompletion: error?.message ?? DEFAULT_ERROR_MESSAGE,
|
|
79
98
|
status: "FAILED",
|
|
80
99
|
outputData: {}
|
|
81
100
|
});
|
|
101
|
+
this.errorHandler(error, task);
|
|
102
|
+
this.logger.error(`Error executing ${task.taskId}`, error);
|
|
82
103
|
}
|
|
83
104
|
};
|
|
84
105
|
this.handleUnknownError = (unknownError) => {
|
|
@@ -96,6 +117,7 @@ var TaskRunner = class {
|
|
|
96
117
|
this.logger = logger;
|
|
97
118
|
this.worker = worker;
|
|
98
119
|
this.options = options;
|
|
120
|
+
this.errorHandler = errorHandler;
|
|
99
121
|
}
|
|
100
122
|
};
|
|
101
123
|
|
|
@@ -226,200 +248,6 @@ var CancelablePromise = class {
|
|
|
226
248
|
};
|
|
227
249
|
Symbol.toStringTag;
|
|
228
250
|
|
|
229
|
-
// src/common/open-api/services/AdminResourceService.ts
|
|
230
|
-
var AdminResourceService = class {
|
|
231
|
-
constructor(httpRequest) {
|
|
232
|
-
this.httpRequest = httpRequest;
|
|
233
|
-
}
|
|
234
|
-
verifyAndRepairWorkflowConsistency(workflowId) {
|
|
235
|
-
return this.httpRequest.request({
|
|
236
|
-
method: "POST",
|
|
237
|
-
url: "/admin/consistency/verifyAndRepair/{workflowId}",
|
|
238
|
-
path: {
|
|
239
|
-
"workflowId": workflowId
|
|
240
|
-
}
|
|
241
|
-
});
|
|
242
|
-
}
|
|
243
|
-
getRedisUsage() {
|
|
244
|
-
return this.httpRequest.request({
|
|
245
|
-
method: "GET",
|
|
246
|
-
url: "/admin/redisUsage"
|
|
247
|
-
});
|
|
248
|
-
}
|
|
249
|
-
view(tasktype, start, count = 100) {
|
|
250
|
-
return this.httpRequest.request({
|
|
251
|
-
method: "GET",
|
|
252
|
-
url: "/admin/task/{tasktype}",
|
|
253
|
-
path: {
|
|
254
|
-
"tasktype": tasktype
|
|
255
|
-
},
|
|
256
|
-
query: {
|
|
257
|
-
"start": start,
|
|
258
|
-
"count": count
|
|
259
|
-
}
|
|
260
|
-
});
|
|
261
|
-
}
|
|
262
|
-
requeueSweep(workflowId) {
|
|
263
|
-
return this.httpRequest.request({
|
|
264
|
-
method: "POST",
|
|
265
|
-
url: "/admin/sweep/requeue/{workflowId}",
|
|
266
|
-
path: {
|
|
267
|
-
"workflowId": workflowId
|
|
268
|
-
}
|
|
269
|
-
});
|
|
270
|
-
}
|
|
271
|
-
getEventQueues(verbose = false) {
|
|
272
|
-
return this.httpRequest.request({
|
|
273
|
-
method: "GET",
|
|
274
|
-
url: "/admin/queues",
|
|
275
|
-
query: {
|
|
276
|
-
"verbose": verbose
|
|
277
|
-
}
|
|
278
|
-
});
|
|
279
|
-
}
|
|
280
|
-
};
|
|
281
|
-
|
|
282
|
-
// src/common/open-api/services/ApplicationResourceService.ts
|
|
283
|
-
var ApplicationResourceService = class {
|
|
284
|
-
constructor(httpRequest) {
|
|
285
|
-
this.httpRequest = httpRequest;
|
|
286
|
-
}
|
|
287
|
-
getApplication(id) {
|
|
288
|
-
return this.httpRequest.request({
|
|
289
|
-
method: "GET",
|
|
290
|
-
url: "/applications/{id}",
|
|
291
|
-
path: {
|
|
292
|
-
"id": id
|
|
293
|
-
}
|
|
294
|
-
});
|
|
295
|
-
}
|
|
296
|
-
updateApplication(id, requestBody) {
|
|
297
|
-
return this.httpRequest.request({
|
|
298
|
-
method: "PUT",
|
|
299
|
-
url: "/applications/{id}",
|
|
300
|
-
path: {
|
|
301
|
-
"id": id
|
|
302
|
-
},
|
|
303
|
-
body: requestBody,
|
|
304
|
-
mediaType: "application/json"
|
|
305
|
-
});
|
|
306
|
-
}
|
|
307
|
-
deleteApplication(id) {
|
|
308
|
-
return this.httpRequest.request({
|
|
309
|
-
method: "DELETE",
|
|
310
|
-
url: "/applications/{id}",
|
|
311
|
-
path: {
|
|
312
|
-
"id": id
|
|
313
|
-
}
|
|
314
|
-
});
|
|
315
|
-
}
|
|
316
|
-
getAccessKeys(id) {
|
|
317
|
-
return this.httpRequest.request({
|
|
318
|
-
method: "GET",
|
|
319
|
-
url: "/applications/{id}/accessKeys",
|
|
320
|
-
path: {
|
|
321
|
-
"id": id
|
|
322
|
-
}
|
|
323
|
-
});
|
|
324
|
-
}
|
|
325
|
-
createAccessKey(id) {
|
|
326
|
-
return this.httpRequest.request({
|
|
327
|
-
method: "POST",
|
|
328
|
-
url: "/applications/{id}/accessKeys",
|
|
329
|
-
path: {
|
|
330
|
-
"id": id
|
|
331
|
-
}
|
|
332
|
-
});
|
|
333
|
-
}
|
|
334
|
-
addRoleToApplicationUser(applicationId, role) {
|
|
335
|
-
return this.httpRequest.request({
|
|
336
|
-
method: "POST",
|
|
337
|
-
url: "/applications/{applicationId}/roles/{role}",
|
|
338
|
-
path: {
|
|
339
|
-
"applicationId": applicationId,
|
|
340
|
-
"role": role
|
|
341
|
-
}
|
|
342
|
-
});
|
|
343
|
-
}
|
|
344
|
-
removeRoleFromApplicationUser(applicationId, role) {
|
|
345
|
-
return this.httpRequest.request({
|
|
346
|
-
method: "DELETE",
|
|
347
|
-
url: "/applications/{applicationId}/roles/{role}",
|
|
348
|
-
path: {
|
|
349
|
-
"applicationId": applicationId,
|
|
350
|
-
"role": role
|
|
351
|
-
}
|
|
352
|
-
});
|
|
353
|
-
}
|
|
354
|
-
toggleAccessKeyStatus(applicationId, keyId) {
|
|
355
|
-
return this.httpRequest.request({
|
|
356
|
-
method: "POST",
|
|
357
|
-
url: "/applications/{applicationId}/accessKeys/{keyId}/status",
|
|
358
|
-
path: {
|
|
359
|
-
"applicationId": applicationId,
|
|
360
|
-
"keyId": keyId
|
|
361
|
-
}
|
|
362
|
-
});
|
|
363
|
-
}
|
|
364
|
-
listApplications() {
|
|
365
|
-
return this.httpRequest.request({
|
|
366
|
-
method: "GET",
|
|
367
|
-
url: "/applications"
|
|
368
|
-
});
|
|
369
|
-
}
|
|
370
|
-
createApplication(requestBody) {
|
|
371
|
-
return this.httpRequest.request({
|
|
372
|
-
method: "POST",
|
|
373
|
-
url: "/applications",
|
|
374
|
-
body: requestBody,
|
|
375
|
-
mediaType: "application/json"
|
|
376
|
-
});
|
|
377
|
-
}
|
|
378
|
-
deleteAccessKey(applicationId, keyId) {
|
|
379
|
-
return this.httpRequest.request({
|
|
380
|
-
method: "DELETE",
|
|
381
|
-
url: "/applications/{applicationId}/accessKeys/{keyId}",
|
|
382
|
-
path: {
|
|
383
|
-
"applicationId": applicationId,
|
|
384
|
-
"keyId": keyId
|
|
385
|
-
}
|
|
386
|
-
});
|
|
387
|
-
}
|
|
388
|
-
};
|
|
389
|
-
|
|
390
|
-
// src/common/open-api/services/AuthorizationResourceService.ts
|
|
391
|
-
var AuthorizationResourceService = class {
|
|
392
|
-
constructor(httpRequest) {
|
|
393
|
-
this.httpRequest = httpRequest;
|
|
394
|
-
}
|
|
395
|
-
grantPermissions(requestBody) {
|
|
396
|
-
return this.httpRequest.request({
|
|
397
|
-
method: "POST",
|
|
398
|
-
url: "/auth/authorization",
|
|
399
|
-
body: requestBody,
|
|
400
|
-
mediaType: "application/json"
|
|
401
|
-
});
|
|
402
|
-
}
|
|
403
|
-
removePermissions(requestBody) {
|
|
404
|
-
return this.httpRequest.request({
|
|
405
|
-
method: "DELETE",
|
|
406
|
-
url: "/auth/authorization",
|
|
407
|
-
body: requestBody,
|
|
408
|
-
mediaType: "application/json"
|
|
409
|
-
});
|
|
410
|
-
}
|
|
411
|
-
getPermissions(type, id) {
|
|
412
|
-
return this.httpRequest.request({
|
|
413
|
-
method: "GET",
|
|
414
|
-
url: "/auth/authorization/{type}/{id}",
|
|
415
|
-
path: {
|
|
416
|
-
"type": type,
|
|
417
|
-
"id": id
|
|
418
|
-
}
|
|
419
|
-
});
|
|
420
|
-
}
|
|
421
|
-
};
|
|
422
|
-
|
|
423
251
|
// src/common/open-api/services/EventResourceService.ts
|
|
424
252
|
var EventResourceService = class {
|
|
425
253
|
constructor(httpRequest) {
|
|
@@ -508,86 +336,6 @@ var EventResourceService = class {
|
|
|
508
336
|
}
|
|
509
337
|
};
|
|
510
338
|
|
|
511
|
-
// src/common/open-api/services/GroupResourceService.ts
|
|
512
|
-
var GroupResourceService = class {
|
|
513
|
-
constructor(httpRequest) {
|
|
514
|
-
this.httpRequest = httpRequest;
|
|
515
|
-
}
|
|
516
|
-
addUserToGroup(groupId, userId) {
|
|
517
|
-
return this.httpRequest.request({
|
|
518
|
-
method: "POST",
|
|
519
|
-
url: "/groups/{groupId}/users/{userId}",
|
|
520
|
-
path: {
|
|
521
|
-
"groupId": groupId,
|
|
522
|
-
"userId": userId
|
|
523
|
-
}
|
|
524
|
-
});
|
|
525
|
-
}
|
|
526
|
-
removeUserFromGroup(groupId, userId) {
|
|
527
|
-
return this.httpRequest.request({
|
|
528
|
-
method: "DELETE",
|
|
529
|
-
url: "/groups/{groupId}/users/{userId}",
|
|
530
|
-
path: {
|
|
531
|
-
"groupId": groupId,
|
|
532
|
-
"userId": userId
|
|
533
|
-
}
|
|
534
|
-
});
|
|
535
|
-
}
|
|
536
|
-
getGroup(id) {
|
|
537
|
-
return this.httpRequest.request({
|
|
538
|
-
method: "GET",
|
|
539
|
-
url: "/groups/{id}",
|
|
540
|
-
path: {
|
|
541
|
-
"id": id
|
|
542
|
-
}
|
|
543
|
-
});
|
|
544
|
-
}
|
|
545
|
-
upsertGroup(id, requestBody) {
|
|
546
|
-
return this.httpRequest.request({
|
|
547
|
-
method: "PUT",
|
|
548
|
-
url: "/groups/{id}",
|
|
549
|
-
path: {
|
|
550
|
-
"id": id
|
|
551
|
-
},
|
|
552
|
-
body: requestBody,
|
|
553
|
-
mediaType: "application/json"
|
|
554
|
-
});
|
|
555
|
-
}
|
|
556
|
-
deleteGroup(id) {
|
|
557
|
-
return this.httpRequest.request({
|
|
558
|
-
method: "DELETE",
|
|
559
|
-
url: "/groups/{id}",
|
|
560
|
-
path: {
|
|
561
|
-
"id": id
|
|
562
|
-
}
|
|
563
|
-
});
|
|
564
|
-
}
|
|
565
|
-
getGrantedPermissions(groupId) {
|
|
566
|
-
return this.httpRequest.request({
|
|
567
|
-
method: "GET",
|
|
568
|
-
url: "/groups/{groupId}/permissions",
|
|
569
|
-
path: {
|
|
570
|
-
"groupId": groupId
|
|
571
|
-
}
|
|
572
|
-
});
|
|
573
|
-
}
|
|
574
|
-
getUsersInGroup(id) {
|
|
575
|
-
return this.httpRequest.request({
|
|
576
|
-
method: "GET",
|
|
577
|
-
url: "/groups/{id}/users",
|
|
578
|
-
path: {
|
|
579
|
-
"id": id
|
|
580
|
-
}
|
|
581
|
-
});
|
|
582
|
-
}
|
|
583
|
-
listGroups() {
|
|
584
|
-
return this.httpRequest.request({
|
|
585
|
-
method: "GET",
|
|
586
|
-
url: "/groups"
|
|
587
|
-
});
|
|
588
|
-
}
|
|
589
|
-
};
|
|
590
|
-
|
|
591
339
|
// src/common/open-api/services/HealthCheckResourceService.ts
|
|
592
340
|
var HealthCheckResourceService = class {
|
|
593
341
|
constructor(httpRequest) {
|
|
@@ -714,122 +462,6 @@ var MetadataResourceService = class {
|
|
|
714
462
|
}
|
|
715
463
|
};
|
|
716
464
|
|
|
717
|
-
// src/common/open-api/services/MigrationResourceService.ts
|
|
718
|
-
var MigrationResourceService = class {
|
|
719
|
-
constructor(httpRequest) {
|
|
720
|
-
this.httpRequest = httpRequest;
|
|
721
|
-
}
|
|
722
|
-
migrateWorkflows(batchSize, startFromTimestamp) {
|
|
723
|
-
return this.httpRequest.request({
|
|
724
|
-
method: "GET",
|
|
725
|
-
url: "/admin/migrate_workflow",
|
|
726
|
-
query: {
|
|
727
|
-
"batchSize": batchSize,
|
|
728
|
-
"startFromTimestamp": startFromTimestamp
|
|
729
|
-
}
|
|
730
|
-
});
|
|
731
|
-
}
|
|
732
|
-
migrateIndex() {
|
|
733
|
-
return this.httpRequest.request({
|
|
734
|
-
method: "GET",
|
|
735
|
-
url: "/admin/migrate_index"
|
|
736
|
-
});
|
|
737
|
-
}
|
|
738
|
-
migrateMetadata() {
|
|
739
|
-
return this.httpRequest.request({
|
|
740
|
-
method: "GET",
|
|
741
|
-
url: "/admin/migrate_metadata"
|
|
742
|
-
});
|
|
743
|
-
}
|
|
744
|
-
};
|
|
745
|
-
|
|
746
|
-
// src/common/open-api/services/PublisherConfigResourceService.ts
|
|
747
|
-
var PublisherConfigResourceService = class {
|
|
748
|
-
constructor(httpRequest) {
|
|
749
|
-
this.httpRequest = httpRequest;
|
|
750
|
-
}
|
|
751
|
-
listAllConfigs() {
|
|
752
|
-
return this.httpRequest.request({
|
|
753
|
-
method: "GET",
|
|
754
|
-
url: "/publishers"
|
|
755
|
-
});
|
|
756
|
-
}
|
|
757
|
-
downloadConfig(id) {
|
|
758
|
-
return this.httpRequest.request({
|
|
759
|
-
method: "GET",
|
|
760
|
-
url: "/publishers/{id}",
|
|
761
|
-
path: {
|
|
762
|
-
"id": id
|
|
763
|
-
}
|
|
764
|
-
});
|
|
765
|
-
}
|
|
766
|
-
uploadConfig(id, requestBody) {
|
|
767
|
-
return this.httpRequest.request({
|
|
768
|
-
method: "PUT",
|
|
769
|
-
url: "/publishers/{id}",
|
|
770
|
-
path: {
|
|
771
|
-
"id": id
|
|
772
|
-
},
|
|
773
|
-
body: requestBody,
|
|
774
|
-
mediaType: "application/json"
|
|
775
|
-
});
|
|
776
|
-
}
|
|
777
|
-
deleteConfig(id) {
|
|
778
|
-
return this.httpRequest.request({
|
|
779
|
-
method: "DELETE",
|
|
780
|
-
url: "/publishers/{id}",
|
|
781
|
-
path: {
|
|
782
|
-
"id": id
|
|
783
|
-
}
|
|
784
|
-
});
|
|
785
|
-
}
|
|
786
|
-
};
|
|
787
|
-
|
|
788
|
-
// src/common/open-api/services/QueueAdminResourceService.ts
|
|
789
|
-
var QueueAdminResourceService = class {
|
|
790
|
-
constructor(httpRequest) {
|
|
791
|
-
this.httpRequest = httpRequest;
|
|
792
|
-
}
|
|
793
|
-
names() {
|
|
794
|
-
return this.httpRequest.request({
|
|
795
|
-
method: "GET",
|
|
796
|
-
url: "/queue/"
|
|
797
|
-
});
|
|
798
|
-
}
|
|
799
|
-
size() {
|
|
800
|
-
return this.httpRequest.request({
|
|
801
|
-
method: "GET",
|
|
802
|
-
url: "/queue/size"
|
|
803
|
-
});
|
|
804
|
-
}
|
|
805
|
-
updateByTaskId(workflowId, taskId, status, requestBody) {
|
|
806
|
-
return this.httpRequest.request({
|
|
807
|
-
method: "POST",
|
|
808
|
-
url: "/queue/update/{workflowId}/task/{taskId}/{status}",
|
|
809
|
-
path: {
|
|
810
|
-
"workflowId": workflowId,
|
|
811
|
-
"taskId": taskId,
|
|
812
|
-
"status": status
|
|
813
|
-
},
|
|
814
|
-
body: requestBody,
|
|
815
|
-
mediaType: "application/json"
|
|
816
|
-
});
|
|
817
|
-
}
|
|
818
|
-
update1(workflowId, taskRefName, status, requestBody) {
|
|
819
|
-
return this.httpRequest.request({
|
|
820
|
-
method: "POST",
|
|
821
|
-
url: "/queue/update/{workflowId}/{taskRefName}/{status}",
|
|
822
|
-
path: {
|
|
823
|
-
"workflowId": workflowId,
|
|
824
|
-
"taskRefName": taskRefName,
|
|
825
|
-
"status": status
|
|
826
|
-
},
|
|
827
|
-
body: requestBody,
|
|
828
|
-
mediaType: "application/json"
|
|
829
|
-
});
|
|
830
|
-
}
|
|
831
|
-
};
|
|
832
|
-
|
|
833
465
|
// src/common/open-api/services/SchedulerResourceService.ts
|
|
834
466
|
var SchedulerResourceService = class {
|
|
835
467
|
constructor(httpRequest) {
|
|
@@ -939,154 +571,6 @@ var SchedulerResourceService = class {
|
|
|
939
571
|
}
|
|
940
572
|
};
|
|
941
573
|
|
|
942
|
-
// src/common/open-api/services/SecretResourceService.ts
|
|
943
|
-
var SecretResourceService = class {
|
|
944
|
-
constructor(httpRequest) {
|
|
945
|
-
this.httpRequest = httpRequest;
|
|
946
|
-
}
|
|
947
|
-
getSecret(key) {
|
|
948
|
-
return this.httpRequest.request({
|
|
949
|
-
method: "GET",
|
|
950
|
-
url: "/secrets/{key}",
|
|
951
|
-
path: {
|
|
952
|
-
"key": key
|
|
953
|
-
}
|
|
954
|
-
});
|
|
955
|
-
}
|
|
956
|
-
putSecret(key, requestBody) {
|
|
957
|
-
return this.httpRequest.request({
|
|
958
|
-
method: "PUT",
|
|
959
|
-
url: "/secrets/{key}",
|
|
960
|
-
path: {
|
|
961
|
-
"key": key
|
|
962
|
-
},
|
|
963
|
-
body: requestBody,
|
|
964
|
-
mediaType: "application/json"
|
|
965
|
-
});
|
|
966
|
-
}
|
|
967
|
-
deleteSecret(key) {
|
|
968
|
-
return this.httpRequest.request({
|
|
969
|
-
method: "DELETE",
|
|
970
|
-
url: "/secrets/{key}",
|
|
971
|
-
path: {
|
|
972
|
-
"key": key
|
|
973
|
-
}
|
|
974
|
-
});
|
|
975
|
-
}
|
|
976
|
-
listSecretsThatUserCanGrantAccessTo() {
|
|
977
|
-
return this.httpRequest.request({
|
|
978
|
-
method: "GET",
|
|
979
|
-
url: "/secrets"
|
|
980
|
-
});
|
|
981
|
-
}
|
|
982
|
-
listAllSecretNames() {
|
|
983
|
-
return this.httpRequest.request({
|
|
984
|
-
method: "POST",
|
|
985
|
-
url: "/secrets"
|
|
986
|
-
});
|
|
987
|
-
}
|
|
988
|
-
secretExists(key) {
|
|
989
|
-
return this.httpRequest.request({
|
|
990
|
-
method: "GET",
|
|
991
|
-
url: "/secrets/{key}/exists",
|
|
992
|
-
path: {
|
|
993
|
-
"key": key
|
|
994
|
-
}
|
|
995
|
-
});
|
|
996
|
-
}
|
|
997
|
-
};
|
|
998
|
-
|
|
999
|
-
// src/common/open-api/services/TagsExperimentalService.ts
|
|
1000
|
-
var TagsExperimentalService = class {
|
|
1001
|
-
constructor(httpRequest) {
|
|
1002
|
-
this.httpRequest = httpRequest;
|
|
1003
|
-
}
|
|
1004
|
-
getWorkflowTags(name) {
|
|
1005
|
-
return this.httpRequest.request({
|
|
1006
|
-
method: "GET",
|
|
1007
|
-
url: "/metadata/workflow/{name}/tags",
|
|
1008
|
-
path: {
|
|
1009
|
-
"name": name
|
|
1010
|
-
}
|
|
1011
|
-
});
|
|
1012
|
-
}
|
|
1013
|
-
setWorkflowTags(name, requestBody) {
|
|
1014
|
-
return this.httpRequest.request({
|
|
1015
|
-
method: "PUT",
|
|
1016
|
-
url: "/metadata/workflow/{name}/tags",
|
|
1017
|
-
path: {
|
|
1018
|
-
"name": name
|
|
1019
|
-
},
|
|
1020
|
-
body: requestBody,
|
|
1021
|
-
mediaType: "application/json"
|
|
1022
|
-
});
|
|
1023
|
-
}
|
|
1024
|
-
addWorkflowTag(name, requestBody) {
|
|
1025
|
-
return this.httpRequest.request({
|
|
1026
|
-
method: "POST",
|
|
1027
|
-
url: "/metadata/workflow/{name}/tags",
|
|
1028
|
-
path: {
|
|
1029
|
-
"name": name
|
|
1030
|
-
},
|
|
1031
|
-
body: requestBody,
|
|
1032
|
-
mediaType: "application/json"
|
|
1033
|
-
});
|
|
1034
|
-
}
|
|
1035
|
-
deleteWorkflowTag(name, requestBody) {
|
|
1036
|
-
return this.httpRequest.request({
|
|
1037
|
-
method: "DELETE",
|
|
1038
|
-
url: "/metadata/workflow/{name}/tags",
|
|
1039
|
-
path: {
|
|
1040
|
-
"name": name
|
|
1041
|
-
},
|
|
1042
|
-
body: requestBody,
|
|
1043
|
-
mediaType: "application/json"
|
|
1044
|
-
});
|
|
1045
|
-
}
|
|
1046
|
-
getTaskTags(taskName) {
|
|
1047
|
-
return this.httpRequest.request({
|
|
1048
|
-
method: "GET",
|
|
1049
|
-
url: "/metadata/task/{taskName}/tags",
|
|
1050
|
-
path: {
|
|
1051
|
-
"taskName": taskName
|
|
1052
|
-
}
|
|
1053
|
-
});
|
|
1054
|
-
}
|
|
1055
|
-
setTaskTags(taskName, requestBody) {
|
|
1056
|
-
return this.httpRequest.request({
|
|
1057
|
-
method: "PUT",
|
|
1058
|
-
url: "/metadata/task/{taskName}/tags",
|
|
1059
|
-
path: {
|
|
1060
|
-
"taskName": taskName
|
|
1061
|
-
},
|
|
1062
|
-
body: requestBody,
|
|
1063
|
-
mediaType: "application/json"
|
|
1064
|
-
});
|
|
1065
|
-
}
|
|
1066
|
-
addTaskTag(taskName, requestBody) {
|
|
1067
|
-
return this.httpRequest.request({
|
|
1068
|
-
method: "POST",
|
|
1069
|
-
url: "/metadata/task/{taskName}/tags",
|
|
1070
|
-
path: {
|
|
1071
|
-
"taskName": taskName
|
|
1072
|
-
},
|
|
1073
|
-
body: requestBody,
|
|
1074
|
-
mediaType: "application/json"
|
|
1075
|
-
});
|
|
1076
|
-
}
|
|
1077
|
-
deleteTaskTag(taskName, requestBody) {
|
|
1078
|
-
return this.httpRequest.request({
|
|
1079
|
-
method: "DELETE",
|
|
1080
|
-
url: "/metadata/task/{taskName}/tags",
|
|
1081
|
-
path: {
|
|
1082
|
-
"taskName": taskName
|
|
1083
|
-
},
|
|
1084
|
-
body: requestBody,
|
|
1085
|
-
mediaType: "application/json"
|
|
1086
|
-
});
|
|
1087
|
-
}
|
|
1088
|
-
};
|
|
1089
|
-
|
|
1090
574
|
// src/common/open-api/services/TaskResourceService.ts
|
|
1091
575
|
var TaskResourceService = class {
|
|
1092
576
|
constructor(httpRequest) {
|
|
@@ -1275,73 +759,6 @@ var TokenResourceService = class {
|
|
|
1275
759
|
}
|
|
1276
760
|
};
|
|
1277
761
|
|
|
1278
|
-
// src/common/open-api/services/UserResourceService.ts
|
|
1279
|
-
var UserResourceService = class {
|
|
1280
|
-
constructor(httpRequest) {
|
|
1281
|
-
this.httpRequest = httpRequest;
|
|
1282
|
-
}
|
|
1283
|
-
getUser(id) {
|
|
1284
|
-
return this.httpRequest.request({
|
|
1285
|
-
method: "GET",
|
|
1286
|
-
url: "/users/{id}",
|
|
1287
|
-
path: {
|
|
1288
|
-
"id": id
|
|
1289
|
-
}
|
|
1290
|
-
});
|
|
1291
|
-
}
|
|
1292
|
-
upsertUser(id, requestBody) {
|
|
1293
|
-
return this.httpRequest.request({
|
|
1294
|
-
method: "PUT",
|
|
1295
|
-
url: "/users/{id}",
|
|
1296
|
-
path: {
|
|
1297
|
-
"id": id
|
|
1298
|
-
},
|
|
1299
|
-
body: requestBody,
|
|
1300
|
-
mediaType: "application/json"
|
|
1301
|
-
});
|
|
1302
|
-
}
|
|
1303
|
-
deleteUser(id) {
|
|
1304
|
-
return this.httpRequest.request({
|
|
1305
|
-
method: "DELETE",
|
|
1306
|
-
url: "/users/{id}",
|
|
1307
|
-
path: {
|
|
1308
|
-
"id": id
|
|
1309
|
-
}
|
|
1310
|
-
});
|
|
1311
|
-
}
|
|
1312
|
-
listUsers(apps = false) {
|
|
1313
|
-
return this.httpRequest.request({
|
|
1314
|
-
method: "GET",
|
|
1315
|
-
url: "/users",
|
|
1316
|
-
query: {
|
|
1317
|
-
"apps": apps
|
|
1318
|
-
}
|
|
1319
|
-
});
|
|
1320
|
-
}
|
|
1321
|
-
getGrantedPermissions1(userId) {
|
|
1322
|
-
return this.httpRequest.request({
|
|
1323
|
-
method: "GET",
|
|
1324
|
-
url: "/users/{userId}/permissions",
|
|
1325
|
-
path: {
|
|
1326
|
-
"userId": userId
|
|
1327
|
-
}
|
|
1328
|
-
});
|
|
1329
|
-
}
|
|
1330
|
-
};
|
|
1331
|
-
|
|
1332
|
-
// src/common/open-api/services/VersionResourceService.ts
|
|
1333
|
-
var VersionResourceService = class {
|
|
1334
|
-
constructor(httpRequest) {
|
|
1335
|
-
this.httpRequest = httpRequest;
|
|
1336
|
-
}
|
|
1337
|
-
getVersion() {
|
|
1338
|
-
return this.httpRequest.request({
|
|
1339
|
-
method: "GET",
|
|
1340
|
-
url: "/version"
|
|
1341
|
-
});
|
|
1342
|
-
}
|
|
1343
|
-
};
|
|
1344
|
-
|
|
1345
762
|
// src/common/open-api/services/WorkflowBulkResourceService.ts
|
|
1346
763
|
var WorkflowBulkResourceService = class {
|
|
1347
764
|
constructor(httpRequest) {
|
|
@@ -1918,23 +1335,12 @@ var ConductorClient = class {
|
|
|
1918
1335
|
}
|
|
1919
1336
|
};
|
|
1920
1337
|
this.token = config?.TOKEN;
|
|
1921
|
-
this.adminResource = new AdminResourceService(this.request);
|
|
1922
|
-
this.applicationResource = new ApplicationResourceService(this.request);
|
|
1923
|
-
this.authorizationResource = new AuthorizationResourceService(this.request);
|
|
1924
1338
|
this.eventResource = new EventResourceService(this.request);
|
|
1925
|
-
this.groupResource = new GroupResourceService(this.request);
|
|
1926
1339
|
this.healthCheckResource = new HealthCheckResourceService(this.request);
|
|
1927
1340
|
this.metadataResource = new MetadataResourceService(this.request);
|
|
1928
|
-
this.migrationResource = new MigrationResourceService(this.request);
|
|
1929
|
-
this.publisherConfigResource = new PublisherConfigResourceService(this.request);
|
|
1930
|
-
this.queueAdminResource = new QueueAdminResourceService(this.request);
|
|
1931
1341
|
this.schedulerResource = new SchedulerResourceService(this.request);
|
|
1932
|
-
this.secretResource = new SecretResourceService(this.request);
|
|
1933
|
-
this.tagsExperimental = new TagsExperimentalService(this.request);
|
|
1934
1342
|
this.taskResource = new TaskResourceService(this.request);
|
|
1935
1343
|
this.tokenResource = new TokenResourceService(this.request);
|
|
1936
|
-
this.userResource = new UserResourceService(this.request);
|
|
1937
|
-
this.versionResource = new VersionResourceService(this.request);
|
|
1938
1344
|
this.workflowBulkResource = new WorkflowBulkResourceService(this.request);
|
|
1939
1345
|
this.workflowResource = new WorkflowResourceService(this.request);
|
|
1940
1346
|
}
|
|
@@ -2473,7 +1879,8 @@ var TaskManager = class {
|
|
|
2473
1879
|
worker,
|
|
2474
1880
|
options,
|
|
2475
1881
|
taskResource: this.client.taskResource,
|
|
2476
|
-
logger: this.logger
|
|
1882
|
+
logger: this.logger,
|
|
1883
|
+
onError: this.errorHandler
|
|
2477
1884
|
});
|
|
2478
1885
|
runner.startPolling();
|
|
2479
1886
|
this.tasks[worker.taskDefName].push(runner);
|
|
@@ -2491,6 +1898,7 @@ var TaskManager = class {
|
|
|
2491
1898
|
}
|
|
2492
1899
|
this.client = client;
|
|
2493
1900
|
this.logger = config.logger ?? new DefaultLogger();
|
|
1901
|
+
this.errorHandler = config.onError ?? noopErrorHandler;
|
|
2494
1902
|
this.workers = workers;
|
|
2495
1903
|
const providedOptions = config.options ?? {};
|
|
2496
1904
|
this.taskManageOptions = __spreadProps(__spreadValues(__spreadValues({}, defaultManagerOptions), providedOptions), {
|
|
@@ -2633,6 +2041,7 @@ export {
|
|
|
2633
2041
|
jsonJqTask,
|
|
2634
2042
|
kafkaPublishTask,
|
|
2635
2043
|
newLoopTask,
|
|
2044
|
+
noopErrorHandler,
|
|
2636
2045
|
orkesConductorClient,
|
|
2637
2046
|
setVariableTask,
|
|
2638
2047
|
simpleTask,
|