elasticio-sailor-nodejs 3.0.0-dev4 → 3.0.0-dev5
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/config/local.json +4 -4
- package/lib/proxy-client.js +1 -0
- package/mise.toml +2 -0
- package/package.json +1 -1
- package/run.js +9 -19
package/config/local.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"LOG_LEVEL": "trace",
|
|
3
|
-
"ELASTICIO_FLOW_ID": "
|
|
3
|
+
"ELASTICIO_FLOW_ID": "692ee23d4ab5d34bb7321559",
|
|
4
4
|
"ELASTICIO_EXEC_ID": "exec_67890",
|
|
5
5
|
"ELASTICIO_STEP_ID": "step_1",
|
|
6
6
|
"ELASTICIO_CONTAINER_ID": "container_abcde",
|
|
@@ -9,11 +9,11 @@
|
|
|
9
9
|
"ELASTICIO_COMP_ID": "component_3344",
|
|
10
10
|
"ELASTICIO_FUNCTION": "data_trigger",
|
|
11
11
|
"ELASTICIO_API_URI": "http://localhost:9000",
|
|
12
|
-
"ELASTICIO_API_USERNAME": "task-
|
|
13
|
-
"ELASTICIO_API_KEY": "
|
|
12
|
+
"ELASTICIO_API_USERNAME": "task-692ee23d4ab5d34bb7321559",
|
|
13
|
+
"ELASTICIO_API_KEY": "976ffec8-455b-494e-9478-2d66761f4040",
|
|
14
14
|
"ELASTICIO_MESSAGE_CRYPTO_IV": "0.03091345790184",
|
|
15
15
|
"ELASTICIO_MESSAGE_CRYPTO_PASSWORD": "password",
|
|
16
|
-
"ELASTICIO_SAILOR_PROXY_URI": "http://localhost:
|
|
16
|
+
"ELASTICIO_SAILOR_PROXY_URI": "http://localhost:5001",
|
|
17
17
|
"ELASTICIO_COMPONENT_PATH": "./spec/component",
|
|
18
18
|
"ELASTICIO_EMIT_LIGHTWEIGHT_MESSAGE": "true"
|
|
19
19
|
}
|
package/lib/proxy-client.js
CHANGED
package/mise.toml
ADDED
package/package.json
CHANGED
package/run.js
CHANGED
|
@@ -57,23 +57,6 @@ async function putOutToSea(settings, ipc) {
|
|
|
57
57
|
ipc.send('init:ended');
|
|
58
58
|
}
|
|
59
59
|
|
|
60
|
-
async function disconnectAndExit() {
|
|
61
|
-
if (!disconnectRequired) {
|
|
62
|
-
return;
|
|
63
|
-
}
|
|
64
|
-
disconnectRequired = false;
|
|
65
|
-
|
|
66
|
-
try {
|
|
67
|
-
logger.info('Disconnecting...');
|
|
68
|
-
await sailor.disconnect();
|
|
69
|
-
logger.info('Successfully disconnected');
|
|
70
|
-
process.exit();
|
|
71
|
-
} catch (err) {
|
|
72
|
-
logger.error(err, 'Unable to disconnect');
|
|
73
|
-
process.exit(-1);
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
|
|
77
60
|
async function gracefulShutdown() {
|
|
78
61
|
if (!disconnectRequired) {
|
|
79
62
|
return;
|
|
@@ -90,8 +73,15 @@ async function gracefulShutdown() {
|
|
|
90
73
|
await sailorInit;
|
|
91
74
|
logger.trace('Waited an init before graceful shutdown');
|
|
92
75
|
|
|
93
|
-
|
|
94
|
-
|
|
76
|
+
try {
|
|
77
|
+
logger.info('Disconnecting...');
|
|
78
|
+
await sailor.scheduleShutdown();
|
|
79
|
+
logger.info('Successfully disconnected');
|
|
80
|
+
process.exit();
|
|
81
|
+
} catch (err) {
|
|
82
|
+
logger.error(err, 'Unable to disconnect');
|
|
83
|
+
process.exit(-1);
|
|
84
|
+
}
|
|
95
85
|
}
|
|
96
86
|
|
|
97
87
|
async function run(settings, ipc) {
|