<commit_before>import Debug from 'debug'

const debug = Debug('react-animatronics:machines:timed-job');

const registerJob = (state, mutators) => job => {
  mutators.registerJob({ job });
}

const registerOnCompleteJob = (state, mutators) => onCompleteJob => {
  mutators.registerOnCompleteJob({ onCompleteJob });
}

// IMPROVE: How to better manage state so its more consistent with the other reducers?
export const start = (state, mutators) => () => {
  debug('starting timed job machine');

  mutators.startMachine();

  const startTime = state.now();

  const tick = () => {
    state.frame = state.requestAnimationFrame(executeJobs);
  }

  const executeJobs = () => {
    if (state.isStopped) return;
    state.jobs.forEach(job => {<commit_msg>:fire: [timed-job] Removed old comment<commit_after>import Debug from 'debug'

const debug = Debug('react-animatronics:machines:timed-job');

const registerJob = (state, mutators) => job => {
  mutators.registerJob({ job });
}

const registerOnCompleteJob = (state, mutators) => onCompleteJob => {
  mutators.registerOnCompleteJob({ onCompleteJob });
}

export const start = (state, mutators) => () => {
  debug('starting timed job machine');

  mutators.startMachine();

  const startTime = state.now();

  const tick = () => {
    state.frame = state.requestAnimationFrame(executeJobs);
  }

  const executeJobs = () => {
    if (state.isStopped) return;
    state.jobs.forEach(job => {
{'fraction_non_alphanumeric': 0.14673157162726008, 'fraction_numerical': 0.0, 'mean_word_length': 4.430188679245283, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 21, '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': '3499467', 'n_tokens_mistral': 455, 'n_tokens_neox': 438, 'n_words': 106}