aboutsummaryrefslogtreecommitdiff
path: root/src/jobd.js
diff options
context:
space:
mode:
authorEvgeny Zinoviev <me@ch1p.io>2021-05-07 23:01:11 +0300
committerEvgeny Zinoviev <me@ch1p.io>2021-05-07 23:01:11 +0300
commit6589671f029d2db3bc110ca0098ed4509c698313 (patch)
tree012491fa275a21653d1f466962c65025c6d95fe8 /src/jobd.js
parenta0a3ee5c2652cd1f1aacaacaae5f3a67293018d3 (diff)
jobd: support 'name' config option
Diffstat (limited to 'src/jobd.js')
-rwxr-xr-xsrc/jobd.js2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/jobd.js b/src/jobd.js
index b5d605f..7c63607 100755
--- a/src/jobd.js
+++ b/src/jobd.js
@@ -1,5 +1,6 @@
#!/usr/bin/env node
const minimist = require('minimist')
+const os = require('os')
const loggerModule = require('./lib/logger')
const config = require('./lib/config')
const db = require('./lib/db')
@@ -183,6 +184,7 @@ function connectToMaster() {
try {
let response = await connection.sendRequest(
new RequestMessage('register-worker', {
+ name: config.get('name') || os.hostname(),
targets: worker.getTargets()
})
)