<commit_before><?php


$app->get('/importer(/)', function() use ($app, $vars){
	$vars['action'] = 'importer';
	$vars['servertime'] = time();
	
	$query = "SELECT * FROM importer ORDER BY batchId DESC, jobPhase ASC LIMIT 200;";
	$result = $app->db->query($query);
	$showDetail = TRUE;
	$running = TRUE;
	$batchBegin = 0;
	while($record = $result->fetch_assoc() ) {
		$record['jobStatistics'] = unserialize($record['jobStatistics']);
		$batchId = $record["batchId"];
		if($record["jobPhase"] === "0") {
			$vars['itemlist'][$batchId] = $record;
			$vars['itemlist'][$batchId]["showDetails"] = $showDetail;
			$vars['itemlist'][$batchId]["lastUpdate"] = $record["jobLastUpdate"];
			$batchBegin = $record['jobStart'];
			$vars['itemlist'][$batchId]['status'] = ($record['jobEnd'] < 1)
				? ($showDetail === TRUE) ? 'running' : 'interrupted'
				: 'finished';
			$showDetail = FALSE;
			continue;
		}
		$vars['itemlist'][$batchId]["interruptedAfter"] = $record["jobLastUpdate"] - $batchBegin;
		$vars['itemlist'][$batchId]["phases"][ $record["jobPhase"] ] = $record;
	}
	$app->render('surrounding.htm', $vars);
});

$app->get('/importer/triggerUpdate', function() use ($app, $vars){
	\Slimpd\importer::queStandardUpdate();
});
<commit_msg>fixed invalid class path<commit_after><?php


$app->get('/importer(/)', function() use ($app, $vars){
	$vars['action'] = 'importer';
	$vars['servertime'] = time();
	
	$query = "SELECT * FROM importer ORDER BY batchId DESC, jobPhase ASC LIMIT 200;";
	$result = $app->db->query($query);
	$showDetail = TRUE;
	$running = TRUE;
	$batchBegin = 0;
	while($record = $result->fetch_assoc() ) {
		$record['jobStatistics'] = unserialize($record['jobStatistics']);
		$batchId = $record["batchId"];
		if($record["jobPhase"] === "0") {
			$vars['itemlist'][$batchId] = $record;
			$vars['itemlist'][$batchId]["showDetails"] = $showDetail;
			$vars['itemlist'][$batchId]["lastUpdate"] = $record["jobLastUpdate"];
			$batchBegin = $record['jobStart'];
			$vars['itemlist'][$batchId]['status'] = ($record['jobEnd'] < 1)
				? ($showDetail === TRUE) ? 'running' : 'interrupted'
				: 'finished';
			$showDetail = FALSE;
			continue;
		}
		$vars['itemlist'][$batchId]["interruptedAfter"] = $record["jobLastUpdate"] - $batchBegin;
		$vars['itemlist'][$batchId]["phases"][ $record["jobPhase"] ] = $record;
	}
	$app->render('surrounding.htm', $vars);
});

$app->get('/importer/triggerUpdate', function() use ($app, $vars){
	\Slimpd\Modules\Importer::queStandardUpdate();
});

{'fraction_non_alphanumeric': 0.23824829248694254, 'fraction_numerical': 0.004821213338690237, 'mean_word_length': 5.935933147632312, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 15, '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': '1431710', 'n_tokens_mistral': 934, 'n_tokens_neox': 868, 'n_words': 145}