@comunica/actor-init-query 2.2.2-alpha.16.0 → 2.2.2-alpha.17.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.
|
@@ -94,9 +94,10 @@ export declare class HttpServiceSparqlEndpoint {
|
|
|
94
94
|
/**
|
|
95
95
|
* Stop after timeout or if the connection is terminated
|
|
96
96
|
* @param {module:http.ServerResponse} response Response object.
|
|
97
|
+
* @param queryId The unique query id.
|
|
97
98
|
* @param {NodeJS.ReadableStream} eventEmitter Query result stream.
|
|
98
99
|
*/
|
|
99
|
-
stopResponse(response: http.ServerResponse, eventEmitter?: EventEmitter): void;
|
|
100
|
+
stopResponse(response: http.ServerResponse, queryId: number, eventEmitter?: EventEmitter): void;
|
|
100
101
|
/**
|
|
101
102
|
* Parses the body of a SPARQL POST request
|
|
102
103
|
* @param {module:http.IncomingMessage} request Request object.
|
|
@@ -334,7 +334,7 @@ class HttpServiceSparqlEndpoint {
|
|
|
334
334
|
process.removeListener('message', messageListener);
|
|
335
335
|
process.send({ type: 'end', queryId });
|
|
336
336
|
});
|
|
337
|
-
this.stopResponse(response, eventEmitter);
|
|
337
|
+
this.stopResponse(response, queryId, eventEmitter);
|
|
338
338
|
}
|
|
339
339
|
async writeServiceDescription(engine, stdout, stderr, request, response, mediaType, headOnly) {
|
|
340
340
|
stdout.write(`[200] ${request.method} to ${request.url}\n`);
|
|
@@ -384,14 +384,15 @@ class HttpServiceSparqlEndpoint {
|
|
|
384
384
|
response.end('The response for the given query could not be serialized for the requested media type\n');
|
|
385
385
|
return;
|
|
386
386
|
}
|
|
387
|
-
this.stopResponse(response, eventEmitter);
|
|
387
|
+
this.stopResponse(response, 0, eventEmitter);
|
|
388
388
|
}
|
|
389
389
|
/**
|
|
390
390
|
* Stop after timeout or if the connection is terminated
|
|
391
391
|
* @param {module:http.ServerResponse} response Response object.
|
|
392
|
+
* @param queryId The unique query id.
|
|
392
393
|
* @param {NodeJS.ReadableStream} eventEmitter Query result stream.
|
|
393
394
|
*/
|
|
394
|
-
stopResponse(response, eventEmitter) {
|
|
395
|
+
stopResponse(response, queryId, eventEmitter) {
|
|
395
396
|
response.on('close', killClient);
|
|
396
397
|
// eslint-disable-next-line @typescript-eslint/no-this-alias,consistent-this
|
|
397
398
|
const self = this;
|
|
@@ -409,6 +410,7 @@ class HttpServiceSparqlEndpoint {
|
|
|
409
410
|
}
|
|
410
411
|
// Kill the worker if we want fresh workers per query
|
|
411
412
|
if (self.freshWorkerPerQuery) {
|
|
413
|
+
process.stderr.write(`Killing fresh worker ${process.pid} after query ${queryId}.\n`);
|
|
412
414
|
// eslint-disable-next-line unicorn/no-process-exit
|
|
413
415
|
process.exit(9);
|
|
414
416
|
}
|
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.17.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.17.0",
|
|
35
|
+
"@comunica/bus-context-preprocess": "2.2.2-alpha.17.0",
|
|
36
|
+
"@comunica/bus-http-invalidate": "2.2.2-alpha.17.0",
|
|
37
|
+
"@comunica/bus-init": "2.2.2-alpha.17.0",
|
|
38
|
+
"@comunica/bus-optimize-query-operation": "2.2.2-alpha.17.0",
|
|
39
|
+
"@comunica/bus-query-operation": "2.2.2-alpha.17.0",
|
|
40
|
+
"@comunica/bus-query-parse": "2.2.2-alpha.17.0",
|
|
41
|
+
"@comunica/bus-query-result-serialize": "2.2.2-alpha.17.0",
|
|
42
|
+
"@comunica/context-entries": "2.2.2-alpha.17.0",
|
|
43
|
+
"@comunica/core": "2.2.2-alpha.17.0",
|
|
44
|
+
"@comunica/logger-pretty": "2.2.2-alpha.17.0",
|
|
45
|
+
"@comunica/runner": "2.2.2-alpha.17.0",
|
|
46
|
+
"@comunica/types": "2.2.2-alpha.17.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": "6ccdd124ae55e650f14ffa0d3e777bb79a45ed68"
|
|
66
66
|
}
|