node_task 0.3.1 → 0.3.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/node_task/nodeTask.js +4 -1
- data/lib/node_task/package.json +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6572e95f28fb56282fed7e35ad50842e0b8efd23
|
4
|
+
data.tar.gz: ebb053f1f37fd78ffd1ee06caf3c45e9d6dce806
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a59d8e17e34aa1a3a97059fb1c21b974ac524d0fe9fa9ffdb440b848e310a70bf68ff7304b060a2703ebcf45444d4eef9c0529bba54322843a08e776297befa5
|
7
|
+
data.tar.gz: 513afb984207136a3f4b98a02901a62c0959d93d835d1ea7e8d18c95fd071f022558eabea5c4c07170e8897ebde8a3f5b5a5552d2f5338f42839ce3f70e67c58
|
data/lib/node_task/nodeTask.js
CHANGED
@@ -4,7 +4,7 @@ var net = require('net')
|
|
4
4
|
var ndjson = require('ndjson')
|
5
5
|
|
6
6
|
var parentCheckInterval = parseInt(process.env.NODE_TASK_PARENT_CHECK_INTERVAL, 10) || 1000
|
7
|
-
var parentPid = String(process.env.
|
7
|
+
var parentPid = String(process.env.NODE_TASK_PARENT_PID)
|
8
8
|
|
9
9
|
var workingDir = path.resolve(process.env.NODE_TASK_CWD || __dirname)
|
10
10
|
var errorLogPath = path.join(workingDir, 'ruby_node_task-error.log')
|
@@ -99,11 +99,14 @@ function onExit() {
|
|
99
99
|
|
100
100
|
function checkParentAliveOrExit() {
|
101
101
|
try {
|
102
|
+
logger.debug('checking parent '+parentPid)
|
102
103
|
process.kill(parentPid, 0)
|
103
104
|
} catch (err) {
|
104
105
|
if (err.code === 'ESRCH') {
|
105
106
|
logger.debug('parent '+parentPid+' is no longer alive, exiting')
|
106
107
|
process.exit()
|
108
|
+
} else {
|
109
|
+
logger.error(err)
|
107
110
|
}
|
108
111
|
}
|
109
112
|
}
|
data/lib/node_task/package.json
CHANGED