Commit 38aa2e580894c08830f7d6c56dc208f8be524863
1 parent
6f2cf1a316
Exists in
master
Write pid.txt as a string
Showing 1 changed file with 2 additions and 3 deletions Inline Diff
index.js
1 | "use strict"; | ||
2 | |||
3 | process.chdir(__dirname); | 1 | process.chdir(__dirname); |
4 | 2 | ||
5 | const fs = require('fs'); | 3 | const fs = require('fs'); |
6 | fs.writeFileSync('pid.txt', process.pid); | 4 | |
5 | fs.writeFileSync('pid.txt', `${process.pid}`); | ||
7 | 6 | ||
8 | const config = require('komodo-sdk/config'); | 7 | const config = require('komodo-sdk/config'); |
9 | 8 | ||
10 | if (config && ( config.name || config.origin )) { | 9 | if (config && ( config.name || config.origin )) { |
11 | global.KOMODO_LOG_LABEL = `KOMODO-CENTER@${ config.name || config.origin }`; | 10 | global.KOMODO_LOG_LABEL = `KOMODO-CENTER@${ config.name || config.origin }`; |
12 | process.title = global.KOMODO_LOG_LABEL; | 11 | process.title = global.KOMODO_LOG_LABEL; |
13 | } | 12 | } |
14 | 13 | ||
15 | const transport = require('./transport'); | 14 | const transport = require('./transport'); |
16 | const trxCenter = require('komodo-sdk/center/messaging/trx-center'); | 15 | const trxCenter = require('komodo-sdk/center/messaging/trx-center'); |
17 | 16 | ||
18 | transport.init(trxCenter.callback); | 17 | transport.init(trxCenter.callback); |
19 | trxCenter.setTransport(transport); | 18 | trxCenter.setTransport(transport); |