<commit_before><?php
require_once dirname(__FILE__).'/accesscheck.php';

@ob_end_clean();
$id = sprintf('%d',$_GET['id']);
if (!$id) {
  return '';
}
$message = Sql_Fetch_Assoc_Query(sprintf('select * from %s where id = %d',$GLOBALS['tables']['message'],$id));
$messagedata = loadMessageData($id);

if ($message['status'] != 'inprocess') {
  $html = $message['status'];
  $html .= '<br/>'.PageLink2("messages",$GLOBALS['I18N']->get("requeue"),"resend=".$message["id"]);
} else {
  $active = time() - $messagedata['last msg sent'];
  if ($active > 60) {
    $html = $GLOBALS['I18N']->get('Stalled');
  } else {
    $html = $GLOBALS['I18N']->get($message['status']).'<br/>'.
    $messagedata['to process'].' '.$GLOBALS['I18N']->get('still to process').'<br/>'.
    $GLOBALS['I18N']->get('ETA').': '.$messagedata['ETA'].'<br/>'.
    $GLOBALS['I18N']->get('Processing').' '.sprintf('%d',$messagedata['msg/hr']).' '.$GLOBALS['I18N']->get('msgs/hr')
    ;
  }
}

print $html;
exit;
?><commit_msg>update to output of message status<commit_after><?php
require_once dirname(__FILE__).'/accesscheck.php';

@ob_end_clean();
$id = sprintf('%d',$_GET['id']);
if (!$id) {
  return '';
}
$message = Sql_Fetch_Assoc_Query(sprintf('select * from %s where id = %d',$GLOBALS['tables']['message'],$id));
$messagedata = loadMessageData($id);

if ($message['status'] != 'inprocess') {
  $html = $message['status'];
  $html .= '<br/>'.PageLink2("messages",$GLOBALS['I18N']->get("requeue"),"resend=".$message["id"]);
} else {
  $active = time() - $messagedata['last msg sent'];
  if ($active > 60) {
    $html = $GLOBALS['I18N']->get('Stalled');
  } else {
    $totalsent = $messagedata['astext'] + 
      $messagedata['ashtml'] + 
      $messagedata['astextandhtml'] + 
      $messagedata['aspdf'] + 
      $messagedata['astextandpdf'];
    $html = $GLOBALS['I18N']->get($message['status']).'<br/>'.
    $messagedata['to process'].' '.$GLOBALS['I18N']->get('still to process').'<br/>'.
    $GLOBALS['I18N']->get('ETA').': '.$messagedata['ETA'].'<br/>'.
    $GLOBALS['I18N']->get('sent').': '.$totalsent.'<br/>'.
    $GLOBALS['I18N']->get('Processing').' '.sprintf('%d',$messagedata['msg/hr']).' '.$GLOBALS['I18N']->get('msgs/hr')
    ;
  }
}

print $html;
exit;
?>

{'fraction_non_alphanumeric': 0.2836752899197145, 'fraction_numerical': 0.016057091882247992, 'mean_word_length': 5.128415300546448, 'pattern_counts': {'":': 0, '<': 14, '<?xml version=': 0, '>': 31, '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': '1066207', 'n_tokens_mistral': 906, 'n_tokens_neox': 873, 'n_words': 117}