(index, https)
| 430 | } |
| 431 | |
| 432 | function exec(index, https) { |
| 433 | |
| 434 | if (TIMEOUTS[index]) { |
| 435 | clearTimeout(TIMEOUTS[index]); |
| 436 | delete TIMEOUTS[index]; |
| 437 | } |
| 438 | |
| 439 | var fork = Cluster.fork(); |
| 440 | fork.$id = index.toString(); |
| 441 | fork.on('message', message); |
| 442 | fork.on('exit', function() { |
| 443 | FORKS[index] = null; |
| 444 | TIMEOUTS[index] = setTimeout(exports.restart, 1000, index); |
| 445 | }); |
| 446 | |
| 447 | if (FORKS[index] === undefined) |
| 448 | FORKS.push(fork); |
| 449 | else |
| 450 | FORKS[index] = fork; |
| 451 | |
| 452 | (function(fork) { |
| 453 | setTimeout(function() { |
| 454 | OPTIONS.options.id = fork.$id; |
| 455 | fork.send({ TYPE: 'init', bundling: !CONTINUE, id: fork.$id, mode: OPTIONS.mode, options: OPTIONS.options, threads: OPTIONS.count, index: index, https: https }); |
| 456 | }, fork.$id * 500); |
| 457 | })(fork); |
| 458 | } |
| 459 | |
| 460 | function fork() { |
| 461 | require('./index'); |
no outgoing calls
no test coverage detected