<commit_before>"use strict"

let async = require("async");
let readpump = require("./readpump.js");
let writepump = require("./writepump.js");
let toml = require("toml");

let config = loadConfig();

// start output handles
let wp = new writepump(config.output);
wp.Run();

// get a readpump
var rp = new readpump(config.input, config.measurements, wp);

async.forever(
	function(forever_next) {
		rp.Run(function(err) {
			console.log("An error occured in the Readpump.")
			wait = config.failoverTimeout || 5000;
			console.log("Restarting readpump in", wait, "seconds.")
			setTimeout(forever_next, wait)
		});
	}, 
	function(err) {
		console.log("Restarting readpump...")
	}
);

function loadConfig() {
	var path = require("path").resolve(__dirname, 'config.toml');
	var text = require("fs").readFileSync(path, "utf8");
	return toml.parse(text);
}
<commit_msg>fixed assignment to undefined var wait.<commit_after>"use strict"

let async = require("async");
let readpump = require("./readpump.js");
let writepump = require("./writepump.js");
let toml = require("toml");

let config = loadConfig();

// start output handles
let wp = new writepump(config.output);
wp.Run();

// get a readpump
var rp = new readpump(config.input, config.measurements, wp);

async.forever(
	function(forever_next) {
		rp.Run(function(err) {
			console.log("An error occured in the Readpump.")
			let wait = config.failoverTimeout || 5000;
			console.log("Restarting readpump in", wait, "seconds.")
			setTimeout(forever_next, wait)
		});
	}, 
	function(err) {
		console.log("Restarting readpump...")
	}
);

function loadConfig() {
	var path = require("path").resolve(__dirname, 'config.toml');
	var text = require("fs").readFileSync(path, "utf8");
	return toml.parse(text);
}

{'fraction_non_alphanumeric': 0.16666666666666666, 'fraction_numerical': 0.005688282138794084, 'mean_word_length': 4.674193548387096, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '7499710', 'n_tokens_mistral': 635, 'n_tokens_neox': 602, 'n_words': 142}