<?php include 'monitor.inc'; include 'alert_functions.inc'; include 'wpt_functions.inc'; include_once 'utils.inc'; require_once 'bootstrap.php'; ini_set('display_errors', 'on'); $wptJobId = '27'; $label = makeLabelFromJobID($wptJobId); exportResultToExternal(array('scenario' => $label, 'browserName' => 'Internet Explorer', 'browserVersion' => '8.0.6001.18702', 'timeToTitle' => "250", 'timeToFirstByte' => "10000", 'nbBytesIn' => "90", 'scoreGzip' => "90", 'scoreCache' => "1500", 'timeToRender' => "200", 'nbHttpQueries' => "100", 'nb404' => '0')); $resultId = '140822_C8_A9'; processResultsForAll($resultId);
// if (isset($_REQUEST['priority'])) // $priority = $_REQUEST['priority']; // // if ( !isset($_REQUEST['numberofruns'] )){ // $numberOfRuns = 1; // } else { // $numberOfRuns = $_REQUEST['numberofruns']; // } // // $userId = getCurrentUserId(); // //if (isset($_REQUEST['runLabel'])) // $runLabel=$_REQUEST['runLabel']; // // if ( isset($resultId) && isset($userId) ){ // processResultsForAll($resultId); // } else { $twoWeeksAgo = current_seconds() - 1209600; // // Try to reprocess all reslults with missing data $q = Doctrine_Query::create()->select('r.WPTResultId')->from('WPTResult r')->where('AvgFirstViewFirstByte = ?', 0)->andWhere('Date > ?', $twoWeeksAgo); $resultIds = $q->fetchArray(); $q->free(true); foreach ($resultIds as $resultId) { echo 'Processing: ' . $resultId['WPTResultId'] . '\\n'; processResultsForAll($resultId['WPTResultId']); } echo 'Completed'; // } // header("Location: ".$forwardTo); /* Make sure that code below does not get executed when we redirect. */ exit;
include_once 'utils.inc'; require_once 'bootstrap.php'; $key = $_REQUEST['key']; $configKey = getWptConfigFor('jobProcessorKey'); if ($configKey != $key) { print "Invalid Key"; exit; } checkQueueGrowthCountAndEmailAlert(); try { $users = Doctrine_Core::getTable('User')->findAll(); foreach ($users as $user) { if ($user->IsActive) { processJobsForUser($user['Id'], null, null, "Scheduled"); } } // Process results for all processResultsForAll(); $jobs = Doctrine_Core::getTable('WPTJob')->findAll(); foreach ($jobs as $job) { processAlertsForJob($job['Id']); } } catch (Exception $e) { error_log("[WPTMonitor] Failed while Listing Users: " . $wptResultId . " message: " . $e->getMessage()); logOutput('[ERROR] [jobProcessor] Exception : ' . $e->getMessage()); } updateQueueProcessRate(); checkTesterRatioAndEmailAlert(); ?>