Beispiel #1
0
     $PAGE->body = $PAGE->body . "</b>";
     $update_notes = $UPDATE->notes();
     if (strlen($update_notes) > 0) {
         $PAGE->body = $PAGE->body . "<ul>";
         $PAGE->body = $PAGE->body . "<br/>";
         $PAGE->body = $PAGE->body . $update_notes;
         $PAGE->body = $PAGE->body . "</ul>";
     }
 } elseif (isset($_GET['page']) && intval($_GET['page']) == 2 && isset($_POST['btnSubmit'])) {
     // CALL THE UPDATE COMMANDS
     $UPDATE->execute();
     $old_version = $current_version;
     // UPDATE THE DATABASE VERSION NUMBER
     $sys_setting = new sys_setting();
     $sys_setting->get_from_hashrange("system", "version");
     $sys_setting->update(array("val" => $next_version));
     $database_version = $sys_setting->val;
     $current_version = $next_version;
     $title_text = getTranslation("Update from version", $settings);
     $title_text = $title_text . " ";
     $title_text = $title_text . $old_version;
     $title_text = $title_text . " ";
     $title_text = $title_text . getTranslation("to version", $settings);
     $title_text = $title_text . " ";
     $title_text = $title_text . $current_version;
     $title_text = $title_text . " ";
     $title_text = $title_text . getTranslation("successful", $settings);
     $update_notes = $UPDATE->notes();
     if (strlen($update_notes) > 0) {
         $PAGE->body = $PAGE->body . "<br/>";
         $PAGE->body = $PAGE->body . "<b>";
Beispiel #2
0
         }
     }
     // HOW MANY OTHER NON-BUSY JOB SERVERS (INC. THIS ONE) WERE LAST SEEN IN THE PAST 30 SECONDS
     $server_second_timerange = 30;
     $current_not_busy_servers = array();
     foreach ($not_busy_servers as $not_busy_server) {
         $timespan = intval(get_time()) - intval($not_busy_server['last_ping']);
         if ($timespan < $server_second_timerange || $INSTANCE_NAME == $not_busy_server['name']) {
             $current_not_busy_servers[] = $not_busy_server;
         }
     }
     //   SORT THIS LIST
     usort($current_not_busy_servers, "nameindexordersort");
     usort($current_not_busy_servers, "lastpingordersort");
     if (count($current_not_busy_servers) > 0) {
         $assigner_setting->update(array("val" => $current_not_busy_servers[0]['name']));
         //"jobcluster-".substr($id_user,0,10),"reassigner");
     }
 }
 // END SECTION - CHANGE REASSIGNER
 // TODO: WHAT IF AN ENTIRE JOB SERVER MACHINE GOES OFFLINE?  NEED TIMEOUT CHANGE ASSIGNER FUNCTIONALITY
 // WAIT FOR JOB STATUS TO BE != UNDEFINED
 $JID = $JOB->id;
 $idx = 0;
 while ($JOB->id_status == "undefined") {
     if ($idx > 10) {
         break;
     }
     sleep(2);
     $JOB->get_from_hashrange($new_job_news->id_user, $INSTANCE_NAME . $new_job_news->id);
     $idx = $idx + 1;