@comunica/actor-init-query 2.2.2-alpha.15.0 → 2.2.2-alpha.16.0
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/lib/HttpServiceSparqlEndpoint.js +8 -8
- package/package.json +15 -15
|
@@ -144,15 +144,11 @@ class HttpServiceSparqlEndpoint {
|
|
|
144
144
|
});
|
|
145
145
|
// Handle worker timeouts
|
|
146
146
|
const workerTimeouts = {};
|
|
147
|
-
let shuttingDown = false;
|
|
148
147
|
worker.on('message', ({ type, queryId }) => {
|
|
149
148
|
if (type === 'start') {
|
|
150
149
|
workerTimeouts[queryId] = setTimeout(() => {
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
worker.send('shutdown');
|
|
154
|
-
shuttingDown = true;
|
|
155
|
-
}
|
|
150
|
+
stderr.write(`Worker ${worker.process.pid} timed out for query ${queryId}.\n`);
|
|
151
|
+
worker.send('shutdown');
|
|
156
152
|
delete workerTimeouts[queryId];
|
|
157
153
|
}, this.timeout);
|
|
158
154
|
}
|
|
@@ -308,8 +304,12 @@ class HttpServiceSparqlEndpoint {
|
|
|
308
304
|
const messageListener = (message) => {
|
|
309
305
|
if (message === 'shutdown') {
|
|
310
306
|
response.end('!TIMEDOUT!', () => {
|
|
311
|
-
//
|
|
312
|
-
|
|
307
|
+
// Wait a bit after sending response end, to make sure that all other responses have also been ended
|
|
308
|
+
setTimeout(() => {
|
|
309
|
+
stderr.write(`Shutting down worker ${process.pid} for query ${queryId}.\n`);
|
|
310
|
+
// eslint-disable-next-line unicorn/no-process-exit
|
|
311
|
+
process.exit(9);
|
|
312
|
+
}, 1000);
|
|
313
313
|
});
|
|
314
314
|
}
|
|
315
315
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@comunica/actor-init-query",
|
|
3
|
-
"version": "2.2.2-alpha.
|
|
3
|
+
"version": "2.2.2-alpha.16.0",
|
|
4
4
|
"description": "A query init actor",
|
|
5
5
|
"lsd:module": true,
|
|
6
6
|
"main": "lib/index.js",
|
|
@@ -31,19 +31,19 @@
|
|
|
31
31
|
"lib/**/*.js"
|
|
32
32
|
],
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@comunica/actor-http-proxy": "2.2.2-alpha.
|
|
35
|
-
"@comunica/bus-context-preprocess": "2.2.2-alpha.
|
|
36
|
-
"@comunica/bus-http-invalidate": "2.2.2-alpha.
|
|
37
|
-
"@comunica/bus-init": "2.2.2-alpha.
|
|
38
|
-
"@comunica/bus-optimize-query-operation": "2.2.2-alpha.
|
|
39
|
-
"@comunica/bus-query-operation": "2.2.2-alpha.
|
|
40
|
-
"@comunica/bus-query-parse": "2.2.2-alpha.
|
|
41
|
-
"@comunica/bus-query-result-serialize": "2.2.2-alpha.
|
|
42
|
-
"@comunica/context-entries": "2.2.2-alpha.
|
|
43
|
-
"@comunica/core": "2.2.2-alpha.
|
|
44
|
-
"@comunica/logger-pretty": "2.2.2-alpha.
|
|
45
|
-
"@comunica/runner": "2.2.2-alpha.
|
|
46
|
-
"@comunica/types": "2.2.2-alpha.
|
|
34
|
+
"@comunica/actor-http-proxy": "2.2.2-alpha.16.0",
|
|
35
|
+
"@comunica/bus-context-preprocess": "2.2.2-alpha.16.0",
|
|
36
|
+
"@comunica/bus-http-invalidate": "2.2.2-alpha.16.0",
|
|
37
|
+
"@comunica/bus-init": "2.2.2-alpha.16.0",
|
|
38
|
+
"@comunica/bus-optimize-query-operation": "2.2.2-alpha.16.0",
|
|
39
|
+
"@comunica/bus-query-operation": "2.2.2-alpha.16.0",
|
|
40
|
+
"@comunica/bus-query-parse": "2.2.2-alpha.16.0",
|
|
41
|
+
"@comunica/bus-query-result-serialize": "2.2.2-alpha.16.0",
|
|
42
|
+
"@comunica/context-entries": "2.2.2-alpha.16.0",
|
|
43
|
+
"@comunica/core": "2.2.2-alpha.16.0",
|
|
44
|
+
"@comunica/logger-pretty": "2.2.2-alpha.16.0",
|
|
45
|
+
"@comunica/runner": "2.2.2-alpha.16.0",
|
|
46
|
+
"@comunica/types": "2.2.2-alpha.16.0",
|
|
47
47
|
"@rdfjs/types": "*",
|
|
48
48
|
"@types/yargs": "^17.0.2",
|
|
49
49
|
"asynciterator": "^3.4.2",
|
|
@@ -62,5 +62,5 @@
|
|
|
62
62
|
"browser": {
|
|
63
63
|
"./lib/index.js": "./lib/index-browser.js"
|
|
64
64
|
},
|
|
65
|
-
"gitHead": "
|
|
65
|
+
"gitHead": "b8c22121ac612fb26bab7daa555a6f1cfbd6edf8"
|
|
66
66
|
}
|