@openfn/ws-worker 1.14.5 → 1.15.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/CHANGELOG.md +17 -0
- package/dist/index.js +12 -6
- package/dist/start.js +12 -6
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
# ws-worker
|
|
2
2
|
|
|
3
|
+
## 1.15.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 569f405: Improve compiler logging output
|
|
8
|
+
- @openfn/engine-multi@1.6.11
|
|
9
|
+
|
|
10
|
+
## 1.15.0
|
|
11
|
+
|
|
12
|
+
Move expression compilation down into the run thread, isolating its memory from the main worker thread. This should work around a memory leak in long-running workers and improve the robustness of the worker generally.
|
|
13
|
+
|
|
14
|
+
Note that workflows with large expressions and low run memory limits may be OOM killed as a result of these changes,
|
|
15
|
+
|
|
16
|
+
### Patch Changes
|
|
17
|
+
|
|
18
|
+
- @openfn/engine-multi@1.6.10
|
|
19
|
+
|
|
3
20
|
## 1.14.5
|
|
4
21
|
|
|
5
22
|
### Patch Changes
|
package/dist/index.js
CHANGED
|
@@ -777,17 +777,22 @@ async function onStepStart(context, event) {
|
|
|
777
777
|
import { timestamp as timestamp3 } from "@openfn/logger";
|
|
778
778
|
var log_final_reason_default = async (context, reason) => {
|
|
779
779
|
const time = (timestamp3() - BigInt(1e7)).toString();
|
|
780
|
-
|
|
781
|
-
if (reason.reason !== "success") {
|
|
782
|
-
message += `
|
|
783
|
-
${reason.error_type}: ${reason.error_message || "unknown"}`;
|
|
784
|
-
}
|
|
780
|
+
const statusMessage = `Run complete with status: ${reason.reason}`;
|
|
785
781
|
await onJobLog(context, {
|
|
786
782
|
time,
|
|
787
|
-
message: [
|
|
783
|
+
message: [statusMessage],
|
|
788
784
|
level: "info",
|
|
789
785
|
name: "R/T"
|
|
790
786
|
});
|
|
787
|
+
if (reason.reason !== "success") {
|
|
788
|
+
const errorMessage = `${reason.error_type}: ${reason.error_message || "unknown"}`;
|
|
789
|
+
await onJobLog(context, {
|
|
790
|
+
time,
|
|
791
|
+
message: [errorMessage],
|
|
792
|
+
level: "info",
|
|
793
|
+
name: "R/T"
|
|
794
|
+
});
|
|
795
|
+
}
|
|
791
796
|
};
|
|
792
797
|
|
|
793
798
|
// src/events/run-complete.ts
|
|
@@ -933,6 +938,7 @@ function execute(channel, engine, logger, plan, input, options = {}, onFinish =
|
|
|
933
938
|
});
|
|
934
939
|
engine.execute(plan, loadedInput, { resolvers, ...options });
|
|
935
940
|
} catch (e) {
|
|
941
|
+
process.exit(66);
|
|
936
942
|
Sentry3.addBreadcrumb({
|
|
937
943
|
category: "run",
|
|
938
944
|
message: "exception in run",
|
package/dist/start.js
CHANGED
|
@@ -917,17 +917,22 @@ async function onStepStart(context, event) {
|
|
|
917
917
|
import { timestamp as timestamp3 } from "@openfn/logger";
|
|
918
918
|
var log_final_reason_default = async (context, reason) => {
|
|
919
919
|
const time = (timestamp3() - BigInt(1e7)).toString();
|
|
920
|
-
|
|
921
|
-
if (reason.reason !== "success") {
|
|
922
|
-
message += `
|
|
923
|
-
${reason.error_type}: ${reason.error_message || "unknown"}`;
|
|
924
|
-
}
|
|
920
|
+
const statusMessage = `Run complete with status: ${reason.reason}`;
|
|
925
921
|
await onJobLog(context, {
|
|
926
922
|
time,
|
|
927
|
-
message: [
|
|
923
|
+
message: [statusMessage],
|
|
928
924
|
level: "info",
|
|
929
925
|
name: "R/T"
|
|
930
926
|
});
|
|
927
|
+
if (reason.reason !== "success") {
|
|
928
|
+
const errorMessage = `${reason.error_type}: ${reason.error_message || "unknown"}`;
|
|
929
|
+
await onJobLog(context, {
|
|
930
|
+
time,
|
|
931
|
+
message: [errorMessage],
|
|
932
|
+
level: "info",
|
|
933
|
+
name: "R/T"
|
|
934
|
+
});
|
|
935
|
+
}
|
|
931
936
|
};
|
|
932
937
|
|
|
933
938
|
// src/events/run-complete.ts
|
|
@@ -1073,6 +1078,7 @@ function execute(channel, engine, logger2, plan, input, options = {}, onFinish =
|
|
|
1073
1078
|
});
|
|
1074
1079
|
engine.execute(plan, loadedInput, { resolvers, ...options });
|
|
1075
1080
|
} catch (e) {
|
|
1081
|
+
process.exit(66);
|
|
1076
1082
|
Sentry3.addBreadcrumb({
|
|
1077
1083
|
category: "run",
|
|
1078
1084
|
message: "exception in run",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openfn/ws-worker",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.15.1",
|
|
4
4
|
"description": "A Websocket Worker to connect Lightning to a Runtime Engine",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -23,10 +23,10 @@
|
|
|
23
23
|
"koa-logger": "^3.2.1",
|
|
24
24
|
"phoenix": "1.7.10",
|
|
25
25
|
"ws": "^8.18.3",
|
|
26
|
-
"@openfn/engine-multi": "1.6.
|
|
26
|
+
"@openfn/engine-multi": "1.6.11",
|
|
27
|
+
"@openfn/logger": "1.0.6",
|
|
27
28
|
"@openfn/lexicon": "^1.2.3",
|
|
28
|
-
"@openfn/runtime": "1.7.2"
|
|
29
|
-
"@openfn/logger": "1.0.6"
|
|
29
|
+
"@openfn/runtime": "1.7.2"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
32
|
"@types/koa": "^2.15.0",
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"tsup": "^6.7.0",
|
|
44
44
|
"typescript": "^4.9.5",
|
|
45
45
|
"yargs": "^17.7.2",
|
|
46
|
-
"@openfn/lightning-mock": "2.2.
|
|
46
|
+
"@openfn/lightning-mock": "2.2.6"
|
|
47
47
|
},
|
|
48
48
|
"files": [
|
|
49
49
|
"dist",
|