@colabo-flow/s-go 0.2.4 → 0.2.5

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.
Files changed (118) hide show
  1. package/README.md +1 -1
  2. package/dist/cjs/{src/lib/go.amqp.host_status.d.ts → demo/create-client.d.ts} +0 -0
  3. package/dist/cjs/{src/lib/go.amqp.service.d.ts → demo/create-host.d.ts} +0 -0
  4. package/dist/{esm/src/lib/go.amqp.host_status.d.ts → cjs/demo/send.d.ts} +0 -0
  5. package/dist/cjs/{src/index.d.ts → index.d.ts} +0 -0
  6. package/dist/cjs/index.js.map +1 -1
  7. package/dist/cjs/{src/lib → lib}/config.d.ts +0 -0
  8. package/dist/cjs/{src/lib → lib}/go.amqp.client.d.ts +0 -0
  9. package/dist/cjs/{src/lib → lib}/go.amqp.host.d.ts +0 -0
  10. package/dist/{esm/src/lib/go.amqp.service.d.ts → cjs/lib/go.amqp.host_status.d.ts} +0 -0
  11. package/dist/cjs/lib/go.amqp.service.d.ts +1 -0
  12. package/dist/cjs/{src/lib → lib}/operators.d.ts +0 -0
  13. package/dist/cjs/{src/lib → lib}/params.d.ts +0 -0
  14. package/dist/cjs/{src/lib → lib}/vos.d.ts +0 -0
  15. package/dist/cjs/test_ts.d.ts +1 -0
  16. package/dist/esm/demo/create-client.d.ts +1 -0
  17. package/dist/esm/demo/create-host.d.ts +1 -0
  18. package/dist/esm/demo/send.d.ts +1 -0
  19. package/dist/esm/{src/index.d.ts → index.d.ts} +0 -0
  20. package/dist/esm/index.js.map +1 -1
  21. package/dist/esm/{src/lib → lib}/config.d.ts +0 -0
  22. package/dist/esm/{src/lib → lib}/go.amqp.client.d.ts +0 -0
  23. package/dist/esm/{src/lib → lib}/go.amqp.host.d.ts +0 -0
  24. package/dist/esm/lib/go.amqp.host_status.d.ts +1 -0
  25. package/dist/esm/lib/go.amqp.service.d.ts +1 -0
  26. package/dist/esm/{src/lib → lib}/operators.d.ts +0 -0
  27. package/dist/esm/{src/lib → lib}/params.d.ts +0 -0
  28. package/dist/esm/{src/lib → lib}/vos.d.ts +0 -0
  29. package/dist/esm/test_ts.d.ts +1 -0
  30. package/package.json +14 -9
  31. package/dist/colabo/src/services/puzzles/flow/go/index.js +0 -7
  32. package/dist/colabo/src/services/puzzles/flow/go/index.js.map +0 -1
  33. package/dist/colabo/src/services/puzzles/flow/go/lib/config.js +0 -21
  34. package/dist/colabo/src/services/puzzles/flow/go/lib/config.js.map +0 -1
  35. package/dist/colabo/src/services/puzzles/flow/go/lib/go.amqp.client.js +0 -80
  36. package/dist/colabo/src/services/puzzles/flow/go/lib/go.amqp.client.js.map +0 -1
  37. package/dist/colabo/src/services/puzzles/flow/go/lib/go.amqp.host.js +0 -237
  38. package/dist/colabo/src/services/puzzles/flow/go/lib/go.amqp.host.js.map +0 -1
  39. package/dist/colabo/src/services/puzzles/flow/go/lib/go.amqp.host_status.js +0 -67
  40. package/dist/colabo/src/services/puzzles/flow/go/lib/go.amqp.host_status.js.map +0 -1
  41. package/dist/colabo/src/services/puzzles/flow/go/lib/go.amqp.service.js +0 -244
  42. package/dist/colabo/src/services/puzzles/flow/go/lib/go.amqp.service.js.map +0 -1
  43. package/dist/colabo/src/services/puzzles/flow/go/lib/operators.js +0 -15
  44. package/dist/colabo/src/services/puzzles/flow/go/lib/operators.js.map +0 -1
  45. package/dist/colabo/src/services/puzzles/flow/go/lib/params.js +0 -2
  46. package/dist/colabo/src/services/puzzles/flow/go/lib/params.js.map +0 -1
  47. package/dist/colabo/src/services/puzzles/flow/go/lib/vos.js +0 -23
  48. package/dist/colabo/src/services/puzzles/flow/go/lib/vos.js.map +0 -1
  49. package/dist/colabo-vue3/src/isomorphic/dev_puzzles/flow/core/index.js +0 -22
  50. package/dist/colabo-vue3/src/isomorphic/dev_puzzles/flow/core/index.js.map +0 -1
  51. package/dist/colabo-vue3/src/isomorphic/dev_puzzles/flow/core/lib/execution/execution-semaphore.js +0 -203
  52. package/dist/colabo-vue3/src/isomorphic/dev_puzzles/flow/core/lib/execution/execution-semaphore.js.map +0 -1
  53. package/dist/colabo-vue3/src/isomorphic/dev_puzzles/flow/core/lib/execution/execution-semaphore.vos.js +0 -2
  54. package/dist/colabo-vue3/src/isomorphic/dev_puzzles/flow/core/lib/execution/execution-semaphore.vos.js.map +0 -1
  55. package/dist/colabo-vue3/src/isomorphic/dev_puzzles/flow/core/lib/execution/execution-vos.js +0 -45
  56. package/dist/colabo-vue3/src/isomorphic/dev_puzzles/flow/core/lib/execution/execution-vos.js.map +0 -1
  57. package/dist/colabo-vue3/src/isomorphic/dev_puzzles/flow/core/lib/execution/execution.operators.js +0 -42
  58. package/dist/colabo-vue3/src/isomorphic/dev_puzzles/flow/core/lib/execution/execution.operators.js.map +0 -1
  59. package/dist/colabo-vue3/src/isomorphic/dev_puzzles/flow/core/lib/execution/flow-execution.service.js +0 -334
  60. package/dist/colabo-vue3/src/isomorphic/dev_puzzles/flow/core/lib/execution/flow-execution.service.js.map +0 -1
  61. package/dist/colabo-vue3/src/isomorphic/dev_puzzles/flow/core/lib/executors/executors-store.js +0 -2
  62. package/dist/colabo-vue3/src/isomorphic/dev_puzzles/flow/core/lib/executors/executors-store.js.map +0 -1
  63. package/dist/colabo-vue3/src/isomorphic/dev_puzzles/flow/core/lib/executors/executors-vos.js +0 -30
  64. package/dist/colabo-vue3/src/isomorphic/dev_puzzles/flow/core/lib/executors/executors-vos.js.map +0 -1
  65. package/dist/colabo-vue3/src/isomorphic/dev_puzzles/flow/core/lib/flow-instance-engine/flow-instance-engine-updates-vos.js +0 -10
  66. package/dist/colabo-vue3/src/isomorphic/dev_puzzles/flow/core/lib/flow-instance-engine/flow-instance-engine-updates-vos.js.map +0 -1
  67. package/dist/colabo-vue3/src/isomorphic/dev_puzzles/flow/core/lib/flow-instance-engine/flow-instance-engine-vos.js +0 -106
  68. package/dist/colabo-vue3/src/isomorphic/dev_puzzles/flow/core/lib/flow-instance-engine/flow-instance-engine-vos.js.map +0 -1
  69. package/dist/colabo-vue3/src/isomorphic/dev_puzzles/flow/core/lib/flow-instance-engine/flow-instance-engine.js +0 -1513
  70. package/dist/colabo-vue3/src/isomorphic/dev_puzzles/flow/core/lib/flow-instance-engine/flow-instance-engine.js.map +0 -1
  71. package/dist/colabo-vue3/src/isomorphic/dev_puzzles/flow/core/lib/flow-instance-engine/index.js +0 -5
  72. package/dist/colabo-vue3/src/isomorphic/dev_puzzles/flow/core/lib/flow-instance-engine/index.js.map +0 -1
  73. package/dist/colabo-vue3/src/isomorphic/dev_puzzles/flow/core/lib/flow-types/flow-type-utils.js +0 -189
  74. package/dist/colabo-vue3/src/isomorphic/dev_puzzles/flow/core/lib/flow-types/flow-type-utils.js.map +0 -1
  75. package/dist/colabo-vue3/src/isomorphic/dev_puzzles/flow/core/lib/flow-types/flow-types-condensed.operators.js +0 -335
  76. package/dist/colabo-vue3/src/isomorphic/dev_puzzles/flow/core/lib/flow-types/flow-types-condensed.operators.js.map +0 -1
  77. package/dist/colabo-vue3/src/isomorphic/dev_puzzles/flow/core/lib/flow-types/flow-types-condensed.vos.js +0 -8
  78. package/dist/colabo-vue3/src/isomorphic/dev_puzzles/flow/core/lib/flow-types/flow-types-condensed.vos.js.map +0 -1
  79. package/dist/colabo-vue3/src/isomorphic/dev_puzzles/flow/core/lib/flow-types/flow-types-form-condensed.operators.js +0 -38
  80. package/dist/colabo-vue3/src/isomorphic/dev_puzzles/flow/core/lib/flow-types/flow-types-form-condensed.operators.js.map +0 -1
  81. package/dist/colabo-vue3/src/isomorphic/dev_puzzles/flow/core/lib/flow-types/flow-types-form-condensed.vos.js +0 -10
  82. package/dist/colabo-vue3/src/isomorphic/dev_puzzles/flow/core/lib/flow-types/flow-types-form-condensed.vos.js.map +0 -1
  83. package/dist/colabo-vue3/src/isomorphic/dev_puzzles/flow/core/lib/flow-types/flow-types-form.vos.js +0 -2
  84. package/dist/colabo-vue3/src/isomorphic/dev_puzzles/flow/core/lib/flow-types/flow-types-form.vos.js.map +0 -1
  85. package/dist/colabo-vue3/src/isomorphic/dev_puzzles/flow/core/lib/flow-types/flow-types-translators.vos.js +0 -5
  86. package/dist/colabo-vue3/src/isomorphic/dev_puzzles/flow/core/lib/flow-types/flow-types-translators.vos.js.map +0 -1
  87. package/dist/colabo-vue3/src/isomorphic/dev_puzzles/flow/core/lib/flow-types/flow-types-visual.vos.js +0 -16
  88. package/dist/colabo-vue3/src/isomorphic/dev_puzzles/flow/core/lib/flow-types/flow-types-visual.vos.js.map +0 -1
  89. package/dist/colabo-vue3/src/isomorphic/dev_puzzles/flow/core/lib/flow-types/flow-types-vos.js +0 -103
  90. package/dist/colabo-vue3/src/isomorphic/dev_puzzles/flow/core/lib/flow-types/flow-types-vos.js.map +0 -1
  91. package/dist/colabo-vue3/src/isomorphic/dev_puzzles/flow/core/lib/flow-types/flow-types.operators.js +0 -121
  92. package/dist/colabo-vue3/src/isomorphic/dev_puzzles/flow/core/lib/flow-types/flow-types.operators.js.map +0 -1
  93. package/dist/colabo-vue3/src/isomorphic/dev_puzzles/flow/core/vos.js +0 -25
  94. package/dist/colabo-vue3/src/isomorphic/dev_puzzles/flow/core/vos.js.map +0 -1
  95. package/dist/colabo-vue3/src/isomorphic/dev_puzzles/utils/verify/index.js +0 -3
  96. package/dist/colabo-vue3/src/isomorphic/dev_puzzles/utils/verify/index.js.map +0 -1
  97. package/dist/colabo-vue3/src/isomorphic/dev_puzzles/utils/verify/lib/assertion.js +0 -20
  98. package/dist/colabo-vue3/src/isomorphic/dev_puzzles/utils/verify/lib/assertion.js.map +0 -1
  99. package/dist/colabo-vue3/src/isomorphic/dev_puzzles/utils/verify/lib/params.js +0 -2
  100. package/dist/colabo-vue3/src/isomorphic/dev_puzzles/utils/verify/lib/params.js.map +0 -1
  101. package/dist/colabo-vue3/src/isomorphic/puzzles/datatalks/cache/index.js +0 -7
  102. package/dist/colabo-vue3/src/isomorphic/puzzles/datatalks/cache/index.js.map +0 -1
  103. package/dist/colabo-vue3/src/isomorphic/puzzles/datatalks/cache/lib/datatalks-cache.service.js +0 -33
  104. package/dist/colabo-vue3/src/isomorphic/puzzles/datatalks/cache/lib/datatalks-cache.service.js.map +0 -1
  105. package/dist/colabo-vue3/src/isomorphic/puzzles/datatalks/cache/lib/datatalks-cache.vos.js +0 -2
  106. package/dist/colabo-vue3/src/isomorphic/puzzles/datatalks/cache/lib/datatalks-cache.vos.js.map +0 -1
  107. package/dist/colabo-vue3/src/isomorphic/puzzles/datatalks/cache/lib/params.js +0 -2
  108. package/dist/colabo-vue3/src/isomorphic/puzzles/datatalks/cache/lib/params.js.map +0 -1
  109. package/dist/colabo-vue3/src/isomorphic/puzzles/datatalks/cache/vos.js +0 -2
  110. package/dist/colabo-vue3/src/isomorphic/puzzles/datatalks/cache/vos.js.map +0 -1
  111. package/dist/colabo-vue3/src/isomorphic/puzzles/headless/core-backend/chalk/index.js +0 -3
  112. package/dist/colabo-vue3/src/isomorphic/puzzles/headless/core-backend/chalk/index.js.map +0 -1
  113. package/dist/colabo-vue3/src/isomorphic/puzzles/transform/json/index.js +0 -6
  114. package/dist/colabo-vue3/src/isomorphic/puzzles/transform/json/index.js.map +0 -1
  115. package/dist/colabo-vue3/src/isomorphic/puzzles/transform/json/lib/transform.js +0 -582
  116. package/dist/colabo-vue3/src/isomorphic/puzzles/transform/json/lib/transform.js.map +0 -1
  117. package/dist/colabo-vue3/src/isomorphic/puzzles/transform/json/lib/vos/transform.vos.js +0 -33
  118. package/dist/colabo-vue3/src/isomorphic/puzzles/transform/json/lib/vos/transform.vos.js.map +0 -1
@@ -1,244 +0,0 @@
1
- // https://www.npmjs.com/package/amqplib
2
- import { connect } from "amqplib";
3
- import chalk from "chalk";
4
- import { v1 as uuidv1 } from "uuid";
5
- import { connectConfig, reportsConfig } from "./config";
6
- import { createGoMsg } from "./operators";
7
- import { EColaboFlowGoMsgType } from "./vos";
8
- process.title = "ColaboFlow.Go.Orchestrator";
9
- const appNameText = `[${chalk.red.bold("Colabo")}${chalk.blue.bold("Flow")}${chalk.green.bold(".Go")}${chalk.green.yellow(".Orchestrator")}]`;
10
- const service = {
11
- serviceName: `${connectConfig.APP_NAME}-service`,
12
- amqpUrl: connectConfig.AMQP_URL,
13
- queueHostHeartbeat: connectConfig.HOST_HEARTBEAT_QUEUE,
14
- queueOrchestrator: connectConfig.ORCHESTRATOR_QUEUE,
15
- finalizedTaskInstancesInfos: {},
16
- runningTaskInstancesInfos: {},
17
- hosts: {},
18
- hostsForTaskIds: {},
19
- };
20
- const asyncProcessColaboFlowMsg_TaskExecute = async (service, msgClientReqObj) => {
21
- /**
22
- * process the request from a client
23
- * */
24
- const msgClientReqExtension = msgClientReqObj.extension;
25
- const taskId = msgClientReqExtension.taskId;
26
- console.log(`${appNameText} Executing task taskId: "${chalk.blueBright(taskId)}`);
27
- /** the name of the queue that the host should return the task execution result and we should listen in the service for it */
28
- const taskExecuteResponseQueue = `service-task_execute_response-${uuidv1()}`;
29
- const hostsForTaskId = service.hostsForTaskIds[taskId];
30
- if (!hostsForTaskId || hostsForTaskId.length <= 0) {
31
- console.error(`${appNameText} Error, there is no host implementing the task: "${taskId}"`);
32
- // TODO: return the response
33
- return;
34
- }
35
- // TODO: just a simple assumption of a single host implementing the task
36
- const hostName = hostsForTaskId[0];
37
- const hostData = service.hosts[hostName];
38
- console.log(`${appNameText} Delivering the task "${chalk.blueBright(taskId)}" to host "${chalk.blueBright(hostName)}" via queue "${chalk.blueBright(hostData.queueHost)}" and listening for the response on the queue: "${chalk.blueBright(taskExecuteResponseQueue)}"`);
39
- /**
40
- * send the request to the host
41
- * */
42
- const msgHostObjRequest = {
43
- ...createGoMsg(service.serviceName, EColaboFlowGoMsgType.TASK_EXECUTE_REQUEST),
44
- replyTo: taskExecuteResponseQueue,
45
- extension: msgClientReqExtension,
46
- msg: "run a ffmepg test task",
47
- };
48
- console.log(`${appNameText} Creating the task execution response queue: "${chalk.blueBright(taskExecuteResponseQueue)}" ...`);
49
- /**
50
- * listen for the response from the host
51
- * */
52
- // https://amqp-node.github.io/amqplib/channel_api.html#channel_assertQueue
53
- await service.hostsChannel.assertQueue(taskExecuteResponseQueue, {
54
- exclusive: true,
55
- });
56
- // NOTE: very important to send the message AFTER activating listener (consumer) on the listening `taskExecuteResponseQueue` queue as otherwise the response from the host could have arrived back BEFORE the listener (consumer) is activated. This was a REAL rat-racing issue!!! (probably due to the long time with handshaking and enabling a new `taskExecuteResponseQueue` with RabbitMQ)
57
- service.hostsChannel.consume(taskExecuteResponseQueue, function (msgHostRes) {
58
- console.log(`${appNameText} Task Execution reply on the queue: "${chalk.blueBright(taskExecuteResponseQueue)}" for the taskId: "${chalk.blueBright(taskId)}"`);
59
- let msgHostResObj;
60
- try {
61
- msgHostResObj = JSON.parse(msgHostRes.content);
62
- // console.log(`${appNameText} Received: "${chalk.blueBright(JSON.stringify(msgHostResObj))}"`);
63
- // console.log(`${appNameText} msgObj.sender: "${chalk.blueBright(msgHostResObj.sender)}", msgObj.type: "${chalk.blueBright(msgHostResObj.type)}, msgObj.msg: "${chalk.blueBright(msgHostResObj.msg)}"`);
64
- }
65
- catch (err) {
66
- console.error(`Error parsing the message: ${msgHostRes.content}`);
67
- return;
68
- }
69
- switch (msgHostResObj.type) {
70
- case EColaboFlowGoMsgType.TASK_EXECUTE_PROGRESS:
71
- const msgHostProgressObjExtension = msgHostResObj.extension;
72
- console.log(`${appNameText} Task Execution PROGRESS: ${JSON.stringify(msgHostProgressObjExtension)}`);
73
- break;
74
- case EColaboFlowGoMsgType.TASK_EXECUTE_RESPONSE:
75
- const msgHostResObjExtension = msgHostResObj.extension;
76
- console.log(`${appNameText} Task Execution RESPONSE: ${JSON.stringify(msgHostResObjExtension.taskOutput)}`);
77
- if (!msgClientReqObj.replyTo) {
78
- console.error(`${appNameText} replyTo is missing in the msgClientReqObj [msgClientReqObj.id: "${chalk.blueBright(msgClientReqObj.id)}"]`);
79
- return;
80
- }
81
- const queueReplyTo = msgClientReqObj.replyTo;
82
- const msgClientRes = {
83
- ...createGoMsg(service.serviceName, EColaboFlowGoMsgType.TASK_EXECUTE_RESPONSE),
84
- requestId: msgClientReqObj.requestId,
85
- msgReplyChainIds: [msgClientReqObj.id],
86
- extension: msgHostResObjExtension,
87
- msg: `Host with tasks`,
88
- };
89
- console.log(`${appNameText} Sending the task Execution response back to the client "${chalk.blueBright(msgClientReqObj.sender)}" through queue: "${chalk.blueBright(queueReplyTo)}"`);
90
- // https://www.w3schools.com/nodejs/met_buffer_from.asp
91
- service.clientsChannel.sendToQueue(queueReplyTo, Buffer.from(JSON.stringify(msgClientRes)));
92
- break;
93
- }
94
- // no need due to `noAck: true,`
95
- // service.hostsChannel.ack(msgHostRes);
96
- }, {
97
- // check if it is good to have it
98
- noAck: true,
99
- });
100
- console.log(`${appNameText} Listening on the queue: "${chalk.blueBright(taskExecuteResponseQueue)}" for the execution response for the task "${chalk.blueBright(taskId)}"`);
101
- // https://www.w3schools.com/nodejs/met_buffer_from.asp
102
- // NOTE: very important to send the message AFTER activating listener (consumer) on the listening `taskExecuteResponseQueue` queue as otherwise the response from the host could have arrived back BEFORE the listener (consumer) is activated. This was a REAL rat-racing issue!!! (probably due to the long time with handshaking and enabling a new `taskExecuteResponseQueue` with RabbitMQ)
103
- service.hostsChannel.sendToQueue(hostData.queueHost, Buffer.from(JSON.stringify(msgHostObjRequest)));
104
- };
105
- const asyncProcessColaboFlowMsg_Heartbeat = async (service, msgObj) => {
106
- const msgExtension = msgObj.extension;
107
- const hostName = msgObj.sender;
108
- // console.log(`${appNameText} [processColaboFlowMsg_TaskExecute] Executing id: ${chalk.blueBright(taskId)}, task.description: ${task.description}`);
109
- // we got a new host
110
- if (!(hostName in service.hosts)) {
111
- console.log(`${appNameText} Discovered a new host: "${chalk.blueBright(hostName)}" with the tasks available: ${chalk.blueBright(JSON.stringify(msgExtension.taskIds))}`);
112
- service.hosts[hostName] = {
113
- hostName,
114
- queueHost: msgExtension.queueHost,
115
- taskIdsAvailable: msgExtension.taskIds,
116
- taskInstanceIds: [],
117
- };
118
- }
119
- const hostData = service.hosts[hostName];
120
- // update the available tasks on each heartbeat as they can evolve
121
- hostData.taskIdsAvailable = msgExtension.taskIds;
122
- for (const taskId of msgExtension.taskIds) {
123
- // new task (not served by any of the known hosts)
124
- if (!service.hostsForTaskIds[taskId])
125
- service.hostsForTaskIds[taskId] = [];
126
- // if the host is not among the "known" hosts serving the task, add it
127
- if (service.hostsForTaskIds[taskId].indexOf(hostName) < 0) {
128
- service.hostsForTaskIds[taskId].push(hostName);
129
- }
130
- }
131
- if (reportsConfig.showHeartbeatMsgs) {
132
- console.log(`${appNameText} Received heartbeat: "${chalk.blueBright(msgObj)}"`);
133
- console.log(`${appNameText} [${msgObj.id}] hostName: "${chalk.blueBright(hostName)}", msgObj.type: "${chalk.blueBright(msgObj.type)}, msgExtension.language: "${chalk.blueBright(msgExtension.language)}, msgExtension.tasks: "${chalk.blueBright(msgExtension.taskIds)}, msgObj.msg: "${chalk.blueBright(msgObj.msg)}"`);
134
- }
135
- // TODO: Send heartbeat reply
136
- // We want the host know that we (service) are there listening
137
- // const msgHeartbeatReply: IColaboFlowGoMsg = {
138
- // ...createGoMsg(service.serviceName, EColaboFlowGoMsgType.TASK_INSTANCES_REPORT__RESPONSE),
139
- // requestId: msgObj.requestId,
140
- // msgReplyChainIds: [msgObj.id],
141
- // extension: {
142
- // id: msgExtension.id,
143
- // serviceName: service.serviceName,
144
- // } as IColaboFlowGoMsgExtension_Heartbeat_Response,
145
- // msg: `"${service.serviceName}" service received the heartbeat from the "${hostName}" host`,
146
- // };
147
- // const queueReplyTo: string = msgObj.replyTo ?? "";
148
- // if (reportsConfig.showReportsMsgs) {
149
- // console.log(`${appNameText} Sending response to the task instances report [queue: "${chalk.blueBright(queueReplyTo)}"]: ${JSON.stringify(msgHeartbeatReply)}`);
150
- // }
151
- // // https://www.w3schools.com/nodejs/met_buffer_from.asp
152
- // service.service.hostsChannel.sendToQueue(queueReplyTo, Buffer.from(JSON.stringify(msgHeartbeatReply)));
153
- };
154
- (async () => {
155
- console.log(`${appNameText} Connecting to the server: ${chalk.greenBright(connectConfig.AMQP_URL)}`);
156
- let colaboFlowServiceConnection;
157
- try {
158
- colaboFlowServiceConnection = await connect(connectConfig.AMQP_URL);
159
- }
160
- catch (err) {
161
- console.error(`Error connecting to the "${chalk.greenBright(connectConfig.AMQP_URL)}" server: ${err}`);
162
- return;
163
- }
164
- console.log(`${appNameText} Opening the ${chalk.bold.italic("clients")} channel`);
165
- try {
166
- service.clientsChannel = await colaboFlowServiceConnection.createChannel();
167
- }
168
- catch (err) {
169
- console.error(`Error creating the ${chalk.greenBright("clients")} queue: ${err}`);
170
- return;
171
- }
172
- console.log(`${appNameText} Opening the ${chalk.bold.italic("hosts")} channel`);
173
- try {
174
- service.hostsChannel = await colaboFlowServiceConnection.createChannel();
175
- }
176
- catch (err) {
177
- console.error(`Error creating the ${chalk.greenBright("hosts")} queue: ${err}`);
178
- return;
179
- }
180
- console.log(`${appNameText} Opening the ${chalk.bold.italic("orchestrator")} queue as a listener: ${chalk.greenBright(service.queueOrchestrator)}`);
181
- // https://amqp-node.github.io/amqplib/channel_api.html#channel_assertQueue
182
- await service.clientsChannel.assertQueue(service.queueOrchestrator, {
183
- durable: true,
184
- exclusive: false,
185
- autoDelete: false,
186
- });
187
- console.log(`${appNameText} Opening the ${chalk.bold.italic("heartbeat")} queue as a listener: ${chalk.greenBright(service.queueHostHeartbeat)}`);
188
- // https://amqp-node.github.io/amqplib/channel_api.html#channel_assertQueue
189
- await service.hostsChannel.assertQueue(service.queueHostHeartbeat, {
190
- durable: true,
191
- exclusive: false,
192
- autoDelete: false,
193
- });
194
- // Orchestrator (tasks) Listener
195
- console.log(`${appNameText} Listening on the orchestrator queue: "${chalk.blueBright(service.queueOrchestrator)}"`);
196
- console.log(`${appNameText} [*] Waiting for orchestrator messages. To exit press "${chalk.blueBright("CTRL+C")}"`);
197
- service.clientsChannel.consume(service.queueOrchestrator, (msg) => {
198
- if (msg !== null) {
199
- let msgObj;
200
- try {
201
- msgObj = JSON.parse(msg.content);
202
- // console.log(`${appNameText} Received: "${chalk.blueBright(JSON.stringify(msgObj))}"`);
203
- console.log(`${appNameText} msgObj.sender: "${chalk.blueBright(msgObj.sender)}", msgObj.msg: "${chalk.blueBright(msgObj.msg)}"`);
204
- switch (msgObj.type) {
205
- case EColaboFlowGoMsgType.TASK_EXECUTE_REQUEST:
206
- asyncProcessColaboFlowMsg_TaskExecute(service, msgObj);
207
- break;
208
- }
209
- }
210
- catch (err) {
211
- console.error(`Error parsing the message: ${msg.content}`);
212
- }
213
- service.clientsChannel.ack(msg);
214
- }
215
- else {
216
- console.log("${appNameText} Consumer cancelled by server");
217
- }
218
- });
219
- // Heartbeat Listener
220
- console.log(`${appNameText} Listening on the heartbeat queue: "${chalk.blueBright(service.queueHostHeartbeat)}"`);
221
- console.log(`${appNameText} [*] Waiting for heartbeat messages. To exit press "${chalk.blueBright("CTRL+C")}"`);
222
- service.clientsChannel.consume(service.queueHostHeartbeat, (msg) => {
223
- if (msg !== null) {
224
- let msgObj;
225
- try {
226
- // console.log(`${appNameText} msgHostRes.content: ${msg.content}`);
227
- msgObj = JSON.parse(msg.content);
228
- switch (msgObj.type) {
229
- case EColaboFlowGoMsgType.HEARTBEAT:
230
- asyncProcessColaboFlowMsg_Heartbeat(service, msgObj);
231
- break;
232
- }
233
- }
234
- catch (err) {
235
- console.error(`Error parsing the message: ${msg.content}`);
236
- }
237
- service.clientsChannel.ack(msg);
238
- }
239
- else {
240
- console.log("${appNameText} Consumer cancelled by server");
241
- }
242
- });
243
- })();
244
- //# sourceMappingURL=go.amqp.service.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"go.amqp.service.js","sourceRoot":"","sources":["../../../../../../../../lib/go.amqp.service.ts"],"names":[],"mappings":"AAAA,wCAAwC;AACxC,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAElC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,EAAE,IAAI,MAAM,EAAE,MA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AAI,EAAE;oBACpB,KAAK,oBAAoB,CAAC,SAAS;wBAClC,mCAAmC,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;wBACrD,MAAM;iBACP;aACD;YAAC,OAAO,GAAG,EAAE;gBACb,OAAO,CAAC,KAAK,CAAC,8BAA8B,GAAG,CAAC,OAAO,EAAE,CAAC,CAAC;aAC3D;YACD,OAAO,CAAC,cAAc,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;SAChC;aAAM;YACN,OAAO,CAAC,GAAG,CAAC,6CAA6C,CAAC,CAAC;SAC3D;IACF,CAAC,CAAC,CAAC;AACJ,CAAC,CAAC,EAAE,CAAC"}
@@ -1,15 +0,0 @@
1
- // https://stackoverflow.com/a/62841516/257561
2
- // import uuidv1 from "uuid/v1";
3
- import { v1 as uuidv1 } from "uuid";
4
- export const createGoMsg = (sender, type) => {
5
- const msg = {
6
- id: `ColaboFlow-msg:${uuidv1()}`,
7
- requestId: `ColaboFlow-request:${uuidv1()}`,
8
- sender,
9
- proxies: [],
10
- msgReplyChainIds: [],
11
- type,
12
- };
13
- return msg;
14
- };
15
- //# sourceMappingURL=operators.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"operators.js","sourceRoot":"","sources":["../../../../../../../../lib/operators.ts"],"names":[],"mappings":"AACA,8CAA8C;AAC9C,gCAAgC;AAChC,OAAO,EAAC,EAAE,IAAI,MAAM,EAAC,MAAM,MAAM,CAAC;AAElC,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,MAAc,EAAE,IAA0B,EAAoB,EAAE;IAC3F,MAAM,GAAG,GAAsB;QAC9B,EAAE,EAAE,kBAAkB,MAAM,EAAE,EAAE;QAChC,SAAS,EAAE,sBAAsB,MAAM,EAAE,EAAE;QAC3C,MAAM;QACN,OAAO,EAAE,EAAE;QACX,gBAAgB,EAAE,EAAE;QACpB,IAAI;KACJ,CAAC;IAEF,OAAO,GAAG,CAAC;AACZ,CAAC,CAAC"}
@@ -1,2 +0,0 @@
1
- export const MODULE_NAME = "@colabo-flow/s-go";
2
- //# sourceMappingURL=params.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"params.js","sourceRoot":"","sources":["../../../../../../../../lib/params.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,WAAW,GAAW,mBAAmB,CAAC"}
@@ -1,23 +0,0 @@
1
- // describes types used in the ColaboFlow.GO puzzle
2
- export var EColaboFlowGoMsgType;
3
- (function (EColaboFlowGoMsgType) {
4
- EColaboFlowGoMsgType["TASK_EXECUTE_REQUEST"] = "TASK_EXECUTE_REQUEST";
5
- EColaboFlowGoMsgType["TASK_EXECUTE_PROGRESS"] = "TASK_EXECUTE_PROGRESS";
6
- EColaboFlowGoMsgType["TASK_EXECUTE_RESPONSE"] = "TASK_EXECUTE_RESPONSE";
7
- EColaboFlowGoMsgType["TASK_INSTANCES_REPORT__REQUEST"] = "TASK_INSTANCES_REPORT__REQUEST";
8
- EColaboFlowGoMsgType["TASK_INSTANCES_REPORT__RESPONSE"] = "TASK_INSTANCES_REPORT__RESPONSE";
9
- EColaboFlowGoMsgType["HEARTBEAT"] = "HEARTBEAT";
10
- })(EColaboFlowGoMsgType || (EColaboFlowGoMsgType = {}));
11
- /** enumeration of all the languages that are supported by ColaboFlow */
12
- export var EProgrammingLanguageSupported;
13
- (function (EProgrammingLanguageSupported) {
14
- /** Javascript or its extensions that will be compiled to JavaScript eventually (TypeScript, Coffeescript) */
15
- EProgrammingLanguageSupported["JAVASCRIPT"] = "JAVASCRIPT";
16
- EProgrammingLanguageSupported["PYTHON"] = "PYTHON";
17
- EProgrammingLanguageSupported["NATIVE"] = "NATIVE";
18
- })(EProgrammingLanguageSupported || (EProgrammingLanguageSupported = {}));
19
- export var ETaskExecute_Progress_Status;
20
- (function (ETaskExecute_Progress_Status) {
21
- ETaskExecute_Progress_Status["INITIALIZED"] = "INITIALIZED";
22
- })(ETaskExecute_Progress_Status || (ETaskExecute_Progress_Status = {}));
23
- //# sourceMappingURL=vos.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"vos.js","sourceRoot":"","sources":["../../../../../../../../lib/vos.ts"],"names":[],"mappings":"AAAA,mDAAmD;AAMnD,MAAM,CAAN,IAAY,oBAOX;AAPD,WAAY,oBAAoB;IAC/B,qEAA6C,CAAA;IAC7C,uEAA+C,CAAA;IAC/C,uEAA+C,CAAA;IAC/C,yFAAiE,CAAA;IACjE,2FAAmE,CAAA;IACnE,+CAAuB,CAAA;AACxB,CAAC,EAPW,oBAAoB,KAApB,oBAAoB,QAO/B;AA4BD,wEAAwE;AACxE,MAAM,CAAN,IAAY,6BAKX;AALD,WAAY,6BAA6B;IACxC,6GAA6G;IAC7G,0DAAyB,CAAA;IACzB,kDAAiB,CAAA;IACjB,kDAAiB,CAAA;AAClB,CAAC,EALW,6BAA6B,KAA7B,6BAA6B,QAKxC;AA4BD,MAAM,CAAN,IAAY,4BAEX;AAFD,WAAY,4BAA4B;IACvC,2DAA2B,CAAA;AAC5B,CAAC,EAFW,4BAA4B,KAA5B,4BAA4B,QAEvC"}
@@ -1,22 +0,0 @@
1
- /*
2
- * Public API Surface of `@colabo-flow/i-core`
3
- */
4
- console.log("Loading the `@colabo-flow/i-core` barrel");
5
- // export { LANGUAGES_SUPPORTED, getPuzzlesDictionary, setCollectingMode, getCurrentlyHarvestedPuzzle, setCurrentPuzzle, reportScannedPuzzles, CFTaskMethod, CFTaskClass, CFTaskFunc } from "./lib/decorators/index";
6
- // export type { IPuzzleEntry, IPuzzlesDictionary, IMethodEntry, IMethodsDictionary, IFunctionEntry, IFunctionsDictionary, IClassEntry, IClassesDictionary } from "./lib/decorators/index";
7
- // common flow declarations
8
- // IFormActivity removed, use IFlowFormTask or condensed version IFlowFormTaskCondensed
9
- export * from "./lib/flow-types/flow-type-utils";
10
- export * from "./lib/flow-types/flow-types.operators";
11
- // common flow instance (execution) declarations
12
- export * from "./lib/flow-instance-engine/flow-instance-engine";
13
- // specialized flow types
14
- export { condensedTaskToTask, condensedFlowToFlow } from "./lib/flow-types/flow-types-condensed.operators";
15
- export { condensedFormTaskToFormTask } from "./lib/flow-types/flow-types-form-condensed.operators";
16
- export { ExecutorIdPlaceAdd, ExecutorIdPlaceGet, ExecutorIdPlaceRemove, EnvironmentBasedOnPlace } from "./lib/execution/execution.operators";
17
- // execution related
18
- // TODO: Hm, compare `ETaskExecutionStatus` with `EFlowTaskExecutionStatus`. Probably we should use EFlowTaskExecutionStatus and just extend it if necessary
19
- export { asyncExecuteTaskWithExecutorInviter, asyncExecuteFlow } from "./lib/execution/flow-execution.service";
20
- export * from "./lib/execution/execution-semaphore";
21
- export * from "./vos";
22
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../../../../../../../colabo-vue3/src/isomorphic/dev_puzzles/flow/core/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,CAAC,GAAG,CAAC,0CAA0C,CAAC,CAAC;AAExD,qNAAqN;AAErN,2LAA2L;AAE3L,2BAA2B;AAC3B,uFAAuF;AACvF,cAAc,kCAAkC,CAAC;AACjD,cAAc,uCAAuC,CAAC;AAEtD,gDAAgD;AAChD,cAAc,iDAAiD,CAAC;AAEhE,yBAAyB;AACzB,OAAO,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,MAAM,iDAAiD,CAAC;AAC3G,OAAO,EAAE,2BAA2B,EAAE,MAAM,sDAAsD,CAAC;AAInG,OAAO,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,qBAAqB,EAAE,uBAAuB,EAAE,MAAM,qCAAqC,CAAC;AAE7I,oBAAoB;AACpB,4JAA4J;AAC5J,OAAO,EAAE,mCAAmC,EAAE,gBAAgB,EAAE,MAAM,wCAAwC,CAAC;AAC/G,cAAc,qCAAqC,CAAC;AAEpD,cAAc,OAAO,CAAC"}
@@ -1,203 +0,0 @@
1
- import { assert } from "@colabo-utils/i-verify";
2
- import { EFlowExecutionStatus } from "./execution-vos";
3
- export const semaphoreCreate = (semaphoreInit) => {
4
- const semaphore = {
5
- id: semaphoreInit.id ?? "",
6
- isPaused: undefined,
7
- infiniteResources: false,
8
- resourceCurrent: 0,
9
- // we have to set it as otherwise Vue reactivity will not work properly (on `undefined`)
10
- resourceFinished: "",
11
- resourcesAvailable: semaphoreInit.resourcesAvailable ?? 0,
12
- };
13
- Object.defineProperty(semaphore, "isPaused", {
14
- get: semaphoreIsPausedFactory(semaphore),
15
- });
16
- return semaphore;
17
- };
18
- export const semaphoreIsPausedFactory = (semaphore) => {
19
- return () => semaphore.resourcesAvailable < 0;
20
- };
21
- export const semaphoreIsSetNonblocking = (semaphore) => {
22
- return semaphore.infiniteResources;
23
- };
24
- /**
25
- * **IMPORTANT** We HAVE to call this factory and set up **NEW** promise **EVERY** time we resolve/reject current one
26
- * as otherwise any new application will not have opportunity to be blocked but immediately resolve
27
- *
28
- * We also have to flush (all?) the previous promises before creating new one as otherwise we will have spooky and zombie blocked consumers
29
- * @param semaphore
30
- */
31
- export const semaphorePromiseFactory = (semaphore) => {
32
- if (semaphore.resourcePromise && semaphore.resourcePromiseResolve) {
33
- semaphore.resourcePromiseResolve(semaphore.resourcesAvailable);
34
- }
35
- semaphore.resourcePromise = new Promise((resolve, reject) => {
36
- semaphore.resourcePromiseResolve = (value) => {
37
- resolve(value);
38
- };
39
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
40
- semaphore.resourcePromiseReject = (reason) => {
41
- // TODO: should we put `EFlowExecutionStatus.FAILED` ?
42
- reject(reason);
43
- };
44
- });
45
- };
46
- /**
47
- * Wait on the next tick available. If available it will continue, if not available it will block on a promise until it gets available (through the call to `semaphoreAddResources()`)
48
- *
49
- * Used by flow instance executor
50
- * @param flowInstanceNS the flow instance (non serializable aspect) we want to manage
51
- * @param tickFinished the text describing the last finished tick (like the id of the tick or executed task(s), etc)
52
- * @returns the number of available ticks
53
- */
54
- export const asyncSemaphoreWaitOnResource = async (semaphore, tickFinished) => {
55
- semaphore.resourceFinished = tickFinished;
56
- if (semaphore.infiniteResources) {
57
- return Promise.resolve(semaphore.resourcesAvailable);
58
- }
59
- else {
60
- // available, let the consumer go
61
- if (semaphore.resourcesAvailable) {
62
- --semaphore.resourcesAvailable;
63
- return Promise.resolve(semaphore.resourcesAvailable);
64
- } // not available, block the consumer
65
- else {
66
- --semaphore.resourcesAvailable;
67
- if (!semaphore.resourcePromise) {
68
- semaphorePromiseFactory(semaphore);
69
- }
70
- assert(semaphore.resourcePromise, `semaphore.resourcePromise should be available after the semaphorePromiseFactory(semaphore)`);
71
- return semaphore.resourcePromise;
72
- }
73
- }
74
- };
75
- export const semaphoreSetNonBlocking = (semaphore) => {
76
- semaphore.infiniteResources = true;
77
- semaphore.resourcesAvailable = 0;
78
- // since there are no limits on resources now, let's release any currently suspended consumers
79
- if (semaphore.resourcePromise && semaphore.resourcePromiseResolve) {
80
- semaphore.resourcePromiseResolve(semaphore.resourcesAvailable);
81
- }
82
- // set a fresh promise
83
- semaphorePromiseFactory(semaphore);
84
- };
85
- export const semaphoreSetBlocking = (semaphore) => {
86
- semaphore.infiniteResources = false;
87
- semaphore.resourcesAvailable = 0;
88
- if (!semaphore.resourcePromise) {
89
- semaphorePromiseFactory(semaphore);
90
- }
91
- };
92
- /**
93
- * Provides additional number (`resourcesToAdd`) of ticks (unless the resources are infinite (<0)) to execute
94
- * @param flowInstanceNS the flow instance (non serializable aspect) we want to manage
95
- * @param resourcesToAdd the number of available ticks to add
96
- * @returns the number of available ticks
97
- */
98
- export const semaphoreAddResources = (semaphore, resourcesToAdd = 1) => {
99
- if (semaphore.resourcesAvailable + resourcesToAdd > 0) {
100
- if (semaphore.resourcePromise && semaphore.resourcePromiseResolve) {
101
- semaphore.resourcePromiseResolve(semaphore.resourcesAvailable + resourcesToAdd);
102
- }
103
- }
104
- semaphore.resourcesAvailable += resourcesToAdd;
105
- semaphorePromiseFactory(semaphore);
106
- return semaphore.resourcesAvailable;
107
- };
108
- /**
109
- * Sets semaphore's resources
110
- *
111
- * If a **negative** number is provided (default) it will enable infinite resources instead and set resources number to 0
112
- * @param semaphore semaphore which we are dealing with
113
- * @param resourcesAvailable the new value of the resources
114
- * @returns the number of resources available
115
- */
116
- export const semaphoreSetResources = (semaphore, resourcesAvailable = -1) => {
117
- if (resourcesAvailable < 0) {
118
- semaphore.infiniteResources = true;
119
- semaphore.resourcesAvailable = 0;
120
- }
121
- else {
122
- semaphore.resourcesAvailable = resourcesAvailable;
123
- semaphore.infiniteResources = true;
124
- }
125
- // if there are no limits on the resources now, let's release any currently suspended consumers
126
- if ((semaphore.infiniteResources || semaphore.resourcesAvailable >= 0) && semaphore.resourcePromiseResolve) {
127
- semaphore.resourcePromiseResolve(semaphore.resourcesAvailable);
128
- }
129
- semaphorePromiseFactory(semaphore);
130
- return semaphore.resourcesAvailable;
131
- };
132
- /**
133
- * Creates new semaphores with new initial values for each semaphore
134
- * @param executionResult execution result that will be updated (`IFlowExecutionResult.executionStatus`) regarding to the semaphores state
135
- * @param semaphoresInit init configs for semaphores
136
- * @returns returns semaphores
137
- */
138
- export const semaphoresCreate = (executionResult, semaphoresInit) => {
139
- const semaphores = {
140
- executionResult,
141
- pausedOn: {},
142
- semaphores: {},
143
- };
144
- for (const semaphoreId in semaphoresInit) {
145
- semaphoresInit[semaphoreId].id = semaphoreId;
146
- const semaphore = semaphoreCreate(semaphoresInit[semaphoreId]);
147
- semaphores.semaphores[semaphoreId] = semaphore;
148
- Object.defineProperty(semaphores.pausedOn, semaphoreId, {
149
- get: () => {
150
- // console.warn(`${semaphore.id}: ${semaphore.isPaused}`);
151
- return semaphore.isPaused;
152
- },
153
- });
154
- }
155
- return semaphores;
156
- };
157
- /**
158
- * Initializes semaphores
159
- *
160
- * If we provide a negative number for the resource in a semaphore (default) it means that execution should run without any interruption. Positive number is number of resources that consumer can consume before it blocks. You can use `semaphoreAddResources()` and `nextMicroTick()` to give more resources. The execution uses `waitOntTick()` to coordinate possibility to continue running`
161
- * @param flowInstanceNS the flow instance (non serializable aspect) we want to manage
162
- * @param tick the initial number of available ticks (<0 means infinite (default))
163
- * @param microTick the initial number of available microTicks (<0 means infinite (default))
164
- */
165
- export const semaphoresInit = (semaphores, resourcesAvailable = {}) => {
166
- for (const semaphoreId in semaphores.semaphores) {
167
- semaphoreSetResources(semaphores.semaphores[semaphoreId], resourcesAvailable[semaphoreId]);
168
- }
169
- };
170
- /** Consolidate overall (semaphores) state
171
- * + executionResult.executionStatus
172
- */
173
- export const semaphoresConsolidate = (semaphores) => {
174
- let isPaused = false;
175
- for (const semaphoreId in semaphores.semaphores) {
176
- const semaphore = semaphores.semaphores[semaphoreId];
177
- if (semaphore.resourcesAvailable < 0)
178
- isPaused = true;
179
- }
180
- if (isPaused) {
181
- semaphores.executionResult.executionStatus = EFlowExecutionStatus.PAUSED;
182
- }
183
- else {
184
- semaphores.executionResult.executionStatus = EFlowExecutionStatus.RUNNING;
185
- }
186
- };
187
- /**
188
- * Factory that will return a function that will be placed as a getter in `semaphoresCreate` function
189
- * @param semaphores semaphores you want to provide the isPaused function for
190
- * @returns returns isPaused function
191
- */
192
- export const semaphoresIsPausedFactory = (semaphores) => {
193
- return () => {
194
- let isPaused = false;
195
- for (const semaphoreId in semaphores.semaphores) {
196
- const semaphore = semaphores.semaphores[semaphoreId];
197
- if (semaphore.isPaused)
198
- isPaused = true;
199
- }
200
- return isPaused;
201
- };
202
- };
203
- //# sourceMappingURL=execution-semaphore.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"execution-semaphore.js","sourceRoot":"","sources":["../../../../../../../../../../../../../../../colabo-vue3/src/isomorphic/dev_puzzles/flow/core/lib/execution/execution-semaphore.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAGhD,OAAO,EAAE,oBAAoB,EAAwB,MAAM,iBAAiB,CAAC;AAE7E,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,aAAsC,EAAuB,EAAE;IAC9F,MAAM,SAAS,GAAwB;QACtC,EAAE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AG,IAAI,CAAC;KACtD;IAED,IAAI,QAAQ,EAAE;QACb,UAAU,CAAC,eAAe,CAAC,eAAe,GAAG,oBAAoB,CAAC,MAAM,CAAC;KACzE;SAAM;QACN,UAAU,CAAC,eAAe,CAAC,eAAe,GAAG,oBAAoB,CAAC,OAAO,CAAC;KAC1E;AACF,CAAC,CAAC;AAEF;;;;GAIG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAAG,CAAC,UAAgC,EAAmB,EAAE;IAC9F,OAAO,GAAY,EAAE;QACpB,IAAI,QAAQ,GAAY,KAAK,CAAC;QAC9B,KAAK,MAAM,WAAW,IAAI,UAAU,CAAC,UAAU,EAAE;YAChD,MAAM,SAAS,GAAwB,UAAU,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC;YAC1E,IAAI,SAAS,CAAC,QAAQ;gBAAE,QAAQ,GAAG,IAAI,CAAC;SACxC;QACD,OAAO,QAAQ,CAAC;IACjB,CAAC,CAAC;AACH,CAAC,CAAC"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=execution-semaphore.vos.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"execution-semaphore.vos.js","sourceRoot":"","sources":["../../../../../../../../../../../../../../../colabo-vue3/src/isomorphic/dev_puzzles/flow/core/lib/execution/execution-semaphore.vos.ts"],"names":[],"mappings":""}
@@ -1,45 +0,0 @@
1
- /** Status of the task execution process.
2
- * It doesn't tell about the **task-related result of task** (did the task return proper result, or there was problem with input results, etc), it tells from the external perspective of the task from the ColaboFlow framework perspective
3
- *
4
- * TODO: Hm, compare `ETaskExecutionStatus` with [`EFlowTaskExecutionStatus`](colabo/src/isomorphic/dev_puzzles/flow/core/lib/evaluation-engine/evaluation-engine-vos.ts). Probably we should use EFlowTaskExecutionStatus and just extend it if necessary
5
- * */
6
- export var ETaskExecutionStatus;
7
- (function (ETaskExecutionStatus) {
8
- /** Not executed at all */
9
- ETaskExecutionStatus["NOT_EXECUTED"] = "NOT_EXECUTED";
10
- /** fully executed */
11
- ETaskExecutionStatus["EXECUTED"] = "EXECUTED";
12
- /** paused before final execution */
13
- ETaskExecutionStatus["PAUSED"] = "PAUSED";
14
- /** interrupted during execution, not finished */
15
- ETaskExecutionStatus["INTERRUPTED"] = "INTERRUPTED";
16
- /** failed in the process of starting the execution.
17
- * **NOTE**: This is different from the success of execution */
18
- ETaskExecutionStatus["FAILED"] = "FAILED";
19
- /** The executor of the task was not found */
20
- ETaskExecutionStatus["EXECUTOR_NOT_FOUND"] = "EXECUTOR_NOT_FOUND";
21
- })(ETaskExecutionStatus || (ETaskExecutionStatus = {}));
22
- /** Status of the flow execution process.
23
- * It doesn't tell about the **task-related result of the flow** (did the task return proper result, or there was problem with input results, etc), it tells from the external perspective of the flow from the ColaboFlow framework perspective
24
- *
25
- * TODO: Hm, compare `ETaskExecutionStatus` with [`EFlowTaskExecutionStatus`](colabo/src/isomorphic/dev_puzzles/flow/core/lib/evaluation-engine/evaluation-engine-vos.ts). Probably we should use EFlowTaskExecutionStatus and just extend it if necessary
26
- * */
27
- export var EFlowExecutionStatus;
28
- (function (EFlowExecutionStatus) {
29
- /** The status is unknown or not available */
30
- EFlowExecutionStatus["UNKNOWN"] = "UNKNOWN";
31
- /** Not executed at all */
32
- EFlowExecutionStatus["RUNNING"] = "RUNNING";
33
- /** fully executed */
34
- EFlowExecutionStatus["EXECUTED"] = "EXECUTED";
35
- /** paused before final execution */
36
- EFlowExecutionStatus["PAUSED"] = "PAUSED";
37
- /** interrupted during execution, not finished */
38
- EFlowExecutionStatus["INTERRUPTED"] = "INTERRUPTED";
39
- /** failed in the process of starting the execution.
40
- * */
41
- EFlowExecutionStatus["FAILED"] = "FAILED";
42
- /** The executor of a flow task was not found */
43
- EFlowExecutionStatus["EXECUTOR_NOT_FOUND"] = "EXECUTOR_NOT_FOUND";
44
- })(EFlowExecutionStatus || (EFlowExecutionStatus = {}));
45
- //# sourceMappingURL=execution-vos.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"execution-vos.js","sourceRoot":"","sources":["../../../../../../../../../../../../../../../colabo-vue3/src/isomorphic/dev_puzzles/flow/core/lib/execution/execution-vos.ts"],"names":[],"mappings":"AAQA;;;;KAIK;AACL,MAAM,CAAN,IAAY,oBAcX;AAdD,WAAY,oBAAoB;IAC/B,0BAA0B;IAC1B,qDAA6B,CAAA;IAC7B,qBAAqB;IACrB,6CAAqB,CAAA;IACrB,oCAAoC;IACpC,yCAAiB,CAAA;IACjB,iDAAiD;IACjD,mDAA2B,CAAA;IAC3B;mEAC+D;IAC/D,yCAAiB,CAAA;IACjB,6CAA6C;IAC7C,iEAAyC,CAAA;AAC1C,CAAC,EAdW,oBAAoB,KAApB,oBAAoB,QAc/B;AAED;;;;KAIK;AACL,MAAM,CAAN,IAAY,oBAgBX;AAhBD,WAAY,oBAAoB;IAC/B,6CAA6C;IAC7C,2CAAmB,CAAA;IACnB,0BAA0B;IAC1B,2CAAmB,CAAA;IACnB,qBAAqB;IACrB,6CAAqB,CAAA;IACrB,oCAAoC;IACpC,yCAAiB,CAAA;IACjB,iDAAiD;IACjD,mDAA2B,CAAA;IAC3B;SACK;IACL,yCAAiB,CAAA;IACjB,gDAAgD;IAChD,iEAAyC,CAAA;AAC1C,CAAC,EAhBW,oBAAoB,KAApB,oBAAoB,QAgB/B"}