dcp-worker 4.2.2 → 4.2.3
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/bin/dcp-worker +7 -0
- package/package.json +2 -2
package/bin/dcp-worker
CHANGED
|
@@ -687,8 +687,15 @@ async function main()
|
|
|
687
687
|
console.error('Unrecoverable', error.code ? `${error.name} (${error.code})` : error.name,
|
|
688
688
|
'- shutting down the worker:', error.message);
|
|
689
689
|
}
|
|
690
|
+
|
|
691
|
+
/* Let the supervisor try to finish slices for up to three minutes after a single unrecoverable error. */
|
|
690
692
|
worker.stop(Boolean(handleWorkerError.count));
|
|
691
693
|
handleWorkerError.count = 1 + (handleWorkerError.count || 0);
|
|
694
|
+
if (handleWorkerError.count === 1)
|
|
695
|
+
{
|
|
696
|
+
setTimeout(() => worker && worker.stop(true), 180e3);
|
|
697
|
+
setTimeout(() => { throw new Error('Shutdown timeout after unrecoverable error') }, 185e3);
|
|
698
|
+
}
|
|
692
699
|
});
|
|
693
700
|
|
|
694
701
|
if (pidfileName && require('../lib/pidfile').write(pidfileName) !== true)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dcp-worker",
|
|
3
|
-
"version": "4.2.
|
|
3
|
+
"version": "4.2.3",
|
|
4
4
|
"description": "Node.js Worker for Distributive Compute Platform",
|
|
5
5
|
"main": "bin/dcp-worker",
|
|
6
6
|
"keywords": [
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"blessed": "0.1.81",
|
|
40
40
|
"blessed-contrib": "4.11.0",
|
|
41
41
|
"chalk": "^4.1.0",
|
|
42
|
-
"dcp-client": "^5.1.
|
|
42
|
+
"dcp-client": "^5.1.4",
|
|
43
43
|
"kvin": "^1.2.7",
|
|
44
44
|
"posix-getopt": "^1.2.1",
|
|
45
45
|
"semver": "^7.3.8",
|