mirror of
https://github.com/DeviceFarmer/stf.git
synced 2026-04-18 02:53:19 +02:00
Give open device ports their own options. Preparing for future refactor.
This commit is contained in:
@@ -32,7 +32,7 @@ module.exports = function(options) {
|
||||
// port, we must ensure that we allocate ports in fixed groups.
|
||||
var ports = options.ports.slice(
|
||||
0
|
||||
, options.ports.length - options.ports.length % 4
|
||||
, options.ports.length - options.ports.length % 2
|
||||
)
|
||||
|
||||
// Information about total devices
|
||||
@@ -303,7 +303,7 @@ module.exports = function(options) {
|
||||
|
||||
// Spawn a device worker
|
||||
function spawn() {
|
||||
var allocatedPorts = ports.splice(0, 4)
|
||||
var allocatedPorts = ports.splice(0, 2)
|
||||
, proc = options.fork(device, allocatedPorts)
|
||||
, resolver = Promise.defer()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user