<commit_before>const path = require('path')
const cpuCount = require('os').cpus().length
const cluster = require('cluster')
const mkdirp = require('mkdirp-promise')

const Worker = require('../lib/class/Worker')
const logs = require('./log')
const killWorkers = require('./killWorkers')

const NOEND = {
  end: false
}

module.exports = async function startWorkers(config, dir, pack, args = [], env = {}, command) {
  const workers = []
  const logString = chunk => command.log(chunk + '')

  if (pack.name === 'z1') {
    throw new Error('the name "z1" is invalid')
  }

  const ports = pack.ports
  const out = logs.get(pack.name)

  // output path
  let output = null
  if (typeof pack.output === 'string') {<commit_msg>ignore logs in resurrect<commit_after>const path = require('path')
const cpuCount = require('os').cpus().length
const cluster = require('cluster')
const mkdirp = require('mkdirp-promise')

const Worker = require('../lib/class/Worker')
const logs = require('./log')
const killWorkers = require('./killWorkers')

const NOEND = {
  end: false
}

module.exports = async function startWorkers(config, dir, pack, args = [], env = {}, command) {
  const workers = []
  const logString = chunk => {
    if (!command || !command.log) {
      return
    }
    command.log(chunk + '')
  }

  if (pack.name === 'z1') {
    throw new Error('the name "z1" is invalid')
  }

  const ports = pack.ports
  const out = logs.get(pack.name)

  // output path
  let output = null
  if (typeof pack.output === 'string') {
{'fraction_non_alphanumeric': 0.1636005256241787, 'fraction_numerical': 0.002628120893561104, 'mean_word_length': 3.6717791411042944, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3595627', 'n_tokens_mistral': 483, 'n_tokens_neox': 474, 'n_words': 137}