dcp-worker 3.2.14 → 3.2.16
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 +35 -25
- package/package.json +8 -7
package/bin/dcp-worker
CHANGED
|
@@ -342,23 +342,31 @@ async function startWorking(cliArgs) {
|
|
|
342
342
|
syslogPort: cliArgs.syslogPort,
|
|
343
343
|
});
|
|
344
344
|
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
345
|
+
try
|
|
346
|
+
{
|
|
347
|
+
require('../lib/remote-console').init(cliArgs.replPort, {
|
|
348
|
+
help: {
|
|
349
|
+
report: 'Print a worker status & slice report',
|
|
350
|
+
kill: 'Kill the worker',
|
|
351
|
+
},
|
|
352
|
+
commands: {
|
|
353
|
+
report: printReport,
|
|
354
|
+
kill: exitcode => exitGuard.exit(exitcode),
|
|
355
|
+
},
|
|
356
|
+
});
|
|
357
|
+
require('../lib/remote-console').setMainEval(function mainEval() { return eval(arguments[0]) });
|
|
358
|
+
}
|
|
359
|
+
catch (error)
|
|
360
|
+
{
|
|
361
|
+
console.warn('350: Failed to initialize remote console:', error.message);
|
|
362
|
+
}
|
|
356
363
|
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
364
|
+
let introBanner = '';
|
|
365
|
+
introBanner += ` * Starting DCP Worker` + '\n';
|
|
366
|
+
introBanner += ` . Configured for scheduler ${dcpConfig.scheduler.location}` + '\n';
|
|
367
|
+
introBanner += ` . Bank is ${dcpConfig.bank.location}` + '\n';
|
|
368
|
+
introBanner += ` . Earned funds will be deposited in account ${paymentAddress}` + '\n';
|
|
369
|
+
introBanner += ` . Identity is ${identityKeystore.address}` + '\n';
|
|
362
370
|
|
|
363
371
|
function qty(amount, singular, plural) /* XXX i18n */
|
|
364
372
|
{
|
|
@@ -374,22 +382,24 @@ async function startWorking(cliArgs) {
|
|
|
374
382
|
}
|
|
375
383
|
|
|
376
384
|
if (dcpWorkerOptions.jobAddresses)
|
|
377
|
-
|
|
385
|
+
introBanner += ` * Processing only ${qty(dcpWorkerOptions.jobAddresses, 'job')} ` + dcpWorkerOptions.jobAddresses.join(', ') + '\n';
|
|
378
386
|
if (dcpWorkerOptions.computeGroups.length)
|
|
379
|
-
|
|
387
|
+
introBanner += ` * Joining compute ${qty(dcpWorkerOptions.computeGroups, 'group')} ` + dcpWorkerOptions.computeGroups.map(el => el.joinKey).join(', ') + '\n';
|
|
380
388
|
if (dcpWorkerOptions.publicGroupFallback)
|
|
381
|
-
|
|
389
|
+
introBanner += ' * Falling back on public group when preferred groups have no work' + '\n';
|
|
382
390
|
else if (dcpWorkerOptions.leavePublicGroup)
|
|
383
|
-
|
|
391
|
+
introBanner += ' * Leaving the public compute group' + '\n';
|
|
384
392
|
if (cliArgs.verbose)
|
|
385
|
-
|
|
393
|
+
introBanner += ` + Verbosity level: ${cliArgs.verbose}` + '\n';
|
|
386
394
|
if (cliArgs.eventDebug)
|
|
387
|
-
|
|
388
|
-
|
|
395
|
+
introBanner += ' + Event debug on' + '\n';
|
|
396
|
+
introBanner += ' . output mode: ' + cliArgs.outputMode + '\n';
|
|
389
397
|
|
|
390
|
-
|
|
398
|
+
introBanner += ' . ready' + '\n';
|
|
399
|
+
|
|
400
|
+
console.log(introBanner);
|
|
391
401
|
|
|
392
|
-
|
|
402
|
+
require('../lib/check-scheduler-version').check();
|
|
393
403
|
|
|
394
404
|
|
|
395
405
|
/** print the slice report via console.log */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dcp-worker",
|
|
3
|
-
"version": "3.2.
|
|
3
|
+
"version": "3.2.16",
|
|
4
4
|
"description": "JavaScript portion of DCP Workers for Node.js",
|
|
5
5
|
"main": "bin/dcp-worker",
|
|
6
6
|
"keywords": [
|
|
@@ -34,13 +34,14 @@
|
|
|
34
34
|
"dependencies": {
|
|
35
35
|
"blessed": "^0.1.81",
|
|
36
36
|
"blessed-contrib": "^4.11.0",
|
|
37
|
-
"bravojs": "^1.0.
|
|
38
|
-
"chalk": "^4.1.
|
|
39
|
-
"dcp-client": "^4.2.
|
|
40
|
-
"
|
|
41
|
-
|
|
37
|
+
"bravojs": "^1.0.16",
|
|
38
|
+
"chalk": "^4.1.0",
|
|
39
|
+
"dcp-client": "^4.2.21",
|
|
40
|
+
"semver": "^7.3.8"
|
|
41
|
+
},
|
|
42
|
+
"optionalDependencies": {
|
|
43
|
+
"telnet-console": "^1.0.4"
|
|
42
44
|
},
|
|
43
|
-
"optionalDependencies": {},
|
|
44
45
|
"devDependencies": {
|
|
45
46
|
"@kingsds/eslint-config": "1.0.1",
|
|
46
47
|
"eslint": "7.30.0"
|