dcp-worker 4.3.6 → 4.3.8
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-evaluator-manager +13 -1
- package/bin/dcp-evaluator-start +9 -2
- package/bin/dcp-task-probe +1 -1
- package/package.json +1 -1
|
@@ -85,6 +85,7 @@ Usage: ${process.argv[0]} [-h | --help] [--prefix=<dir>] [--pts=<dir>]
|
|
|
85
85
|
[-s | --signal=[name or number][,<toggle|quick>]]
|
|
86
86
|
[-T | --loadavg-type=<short,medium,long,random>]
|
|
87
87
|
[-f | --pidfile=</path/to/file.pid>]
|
|
88
|
+
[--node=</path/to/node>]
|
|
88
89
|
[-- <options to dcp-evaluator-start, must be last option>]
|
|
89
90
|
Where:
|
|
90
91
|
-i sets the idle timeout in seconds for tty sessions (${daemonConfig.session.idleTimeout}s)
|
|
@@ -106,6 +107,8 @@ Where:
|
|
|
106
107
|
A value of zero disables this limit; the default value is ${daemonConfig.limits.maxLoad}.
|
|
107
108
|
--loadavg-type determines how load is measured; 'short', 'medium', 'long',
|
|
108
109
|
'random'. Random generates a load between 0 and 1 (${daemonConfig.limits.loadavgType}).
|
|
110
|
+
--node is the path to the node executable to spawn dcp-evaluator-start with;
|
|
111
|
+
default value is ${process.argv[0]}.
|
|
109
112
|
|
|
110
113
|
-L only apply the limits when the monitors say the machine is busy
|
|
111
114
|
|
|
@@ -265,6 +268,9 @@ function handleConnection (socket, config)
|
|
|
265
268
|
windowsHide: true,
|
|
266
269
|
maxBuffer: 1024 * 1024 * 1024 * 2,
|
|
267
270
|
};
|
|
271
|
+
|
|
272
|
+
if (daemonConfig.ldLibraryPath)
|
|
273
|
+
options.env['LD_LIBRARY_PATH'] = daemonConfig.ldLibraryPath;
|
|
268
274
|
Object.apply(options, daemonConfig.spawnOptions);
|
|
269
275
|
child = require('child_process').spawn(config.proc, config.argv, options);
|
|
270
276
|
child.stderr.setEncoding('ascii');
|
|
@@ -575,7 +581,7 @@ async function main()
|
|
|
575
581
|
utils.getoptParse(process.argv.slice(2), ''
|
|
576
582
|
+ 'h(help)P:(prefix)H:p:d:(disable-monitor)l:(max-load)r:(rate)'
|
|
577
583
|
+ 'Li:as:(signal)T:(loadavg-type)f:(pidfile)n(no-pidfile)'
|
|
578
|
-
+ '*:(logfile)*(overwrite-logfile)*:(syslog)*:(min-level)'))
|
|
584
|
+
+ '*:(logfile)*(overwrite-logfile)*:(syslog)*:(min-level)*:(node)'))
|
|
579
585
|
{
|
|
580
586
|
switch (option)
|
|
581
587
|
{
|
|
@@ -710,6 +716,12 @@ async function main()
|
|
|
710
716
|
loggingOptions.minLevel[which] = level;
|
|
711
717
|
break;
|
|
712
718
|
}
|
|
719
|
+
case 'node':
|
|
720
|
+
{
|
|
721
|
+
daemonConfig.proc = optarg;
|
|
722
|
+
daemonConfig.ldLibraryPath = path.dirname(optarg);
|
|
723
|
+
break;
|
|
724
|
+
}
|
|
713
725
|
case '--':
|
|
714
726
|
daemonConfig.argv = daemonConfig.argv.concat(argvSegment); /* All options after -- pass to dcp-evaluator-start */
|
|
715
727
|
break;
|
package/bin/dcp-evaluator-start
CHANGED
|
@@ -59,6 +59,7 @@ function main()
|
|
|
59
59
|
evaluator: path.join('bin', 'dcp-evaluator'), /* resolved against prefix later */
|
|
60
60
|
verbose: 0,
|
|
61
61
|
};
|
|
62
|
+
let files = []; /* Startup files passed to evaluator as supplementary arguments */
|
|
62
63
|
|
|
63
64
|
function help() {
|
|
64
65
|
const binName = path.basename(__filename);
|
|
@@ -82,6 +83,8 @@ Options:
|
|
|
82
83
|
${options.sandboxDefinitions}
|
|
83
84
|
--sandbox-libexec-dir= Location of sandbox setup files; default is
|
|
84
85
|
${options.sandboxLibexecDir}
|
|
86
|
+
--additional-files= Additional files to concat before the normal sandbox setup
|
|
87
|
+
files. Expects absolute paths
|
|
85
88
|
-D, --dump Dump configuration to stdout and exit
|
|
86
89
|
-T, --dump-types Dump list of known sandbox types to stdout and exit
|
|
87
90
|
-F, --dump-files Dump list of startup files which would be passed
|
|
@@ -109,7 +112,7 @@ Options:
|
|
|
109
112
|
+ 'h(help)P:(prefix)p:(port)s(stdio)e:(evaluator)r:(rEvaluator)'
|
|
110
113
|
+ '*:(sandbox-libexec-dir)*:(sandbox-definitions)t:(sandbox-type)'
|
|
111
114
|
+ 'D(dump)T(dump-types)F(dump-files)J(json)v(verbose)f:(pidfile)d:(logLevel)'
|
|
112
|
-
+ '*:(logfile)*(overwrite-logfile)*:(syslog)*:(min-level)'))
|
|
115
|
+
+ '*:(logfile)*(overwrite-logfile)*:(syslog)*:(min-level)*:(additional-files)'))
|
|
113
116
|
{
|
|
114
117
|
switch (option)
|
|
115
118
|
{
|
|
@@ -190,6 +193,11 @@ Options:
|
|
|
190
193
|
loggingOptions.minLevel[which] = level;
|
|
191
194
|
break;
|
|
192
195
|
}
|
|
196
|
+
case 'additional-files':
|
|
197
|
+
{
|
|
198
|
+
files.push(optarg);
|
|
199
|
+
break;
|
|
200
|
+
}
|
|
193
201
|
case '--':
|
|
194
202
|
options.evaluatorOptions = argvSegment; /* after --, pass to evaluator as-is */
|
|
195
203
|
break;
|
|
@@ -210,7 +218,6 @@ Options:
|
|
|
210
218
|
panic(`Invalid sandbox type: ${options.sandboxType}`);
|
|
211
219
|
|
|
212
220
|
let args = []; /* Command-line arguments to pass to evaluator */
|
|
213
|
-
let files = []; /* Startup files passed to evaluator as supplementary arguments */
|
|
214
221
|
|
|
215
222
|
if (!options.stdio && options.port)
|
|
216
223
|
args = args.concat(['-p', options.port]);
|
package/bin/dcp-task-probe
CHANGED
|
@@ -510,7 +510,7 @@ async function requestTask(dummyWorker, opts)
|
|
|
510
510
|
sandbox: dummyWorker.config.maxSandboxes,
|
|
511
511
|
},
|
|
512
512
|
jobQuanta: [ 1 ]/* this.quanta.calculateJobQuanta() */,
|
|
513
|
-
capabilities: require('dcp/
|
|
513
|
+
capabilities: require('dcp/constants').scheduler.capabilities.toBits(dummyWorker.config.capabilities),
|
|
514
514
|
paymentAddress: dummyWorker.config.paymentAddress,
|
|
515
515
|
jobIds: dummyWorker.config.jobIds || [],
|
|
516
516
|
minimumWage: dummyWorker.config.minimumWage,
|