示例#1
0
文件: index.php 项目: hisapi/his
 $prop = array();
 $prop["id_user"] = $u->id_user;
 $prop["id"] = $this_job_id;
 $prop["id_status"] = 'new';
 $prop["id_hf"] = $qn;
 $prop["dt_created"] = $this_time;
 $prop["dt_modified"] = $this_time;
 $prop["str_rqdata"] = $rd;
 $prop["str_response"] = 'undefined';
 $prop["str_output"] = 'undefined';
 $new_job_id = new job_id_user();
 $new_job_id->create($prop);
 $prop = array();
 $prop["id_user"] = $u->id_user;
 $prop["id"] = $this_job_id;
 $new_job = new job_new();
 if ($APP['ms']->kind != "no-messaging") {
     $new_job->set($prop);
     $xml_send = $new_job->toobjectxml();
     $new_job->send("sendto_" . $selected_job_server_name, $xml_send);
 } else {
     $new_job->create($prop);
 }
 if ($mode_jidonly) {
     echo $this_job_id;
 }
 if ($mode_edit) {
     $alert_messages = $alert_messages . "<center><span style='background-color:green;color:white;'>" . getTranslation("Job", $settings) . " <a style='color:white;' href='?q={$qn}&v=job-servers#unfinished_" . str_replace("<", "&lt;", $this_job_id) . "'>" . str_replace("<", "&lt;", $this_job_id) . "</a> " . getTranslation("has been submitted", $settings) . "</span></center>";
 }
 if ($mode_jidonly) {
     return;
示例#2
0
 usort($current_not_busy_servers, "nameindexordersort");
 usort($current_not_busy_servers, "lastpingordersort");
 $current_not_busy_servers_by_name = array();
 foreach ($current_not_busy_servers as $current_not_busy_server) {
     $current_not_busy_servers_by_name[$current_not_busy_server['name']] = $current_not_busy_server;
 }
 //echo "CURRENT NOT BUSY SERVERS:";print_r($current_not_busy_servers_by_name);
 $reassign_jobs_older_than_seconds = 60 * 60;
 // 1 hour
 $assigned_servers = array();
 //echo "FIRST SERVER:".$current_not_busy_servers[0]['name'];
 //   IS THIS SERVER THE FIRST IN THE LIST?
 if (count($current_not_busy_servers) > 0) {
     //echo "HOW MANY WAITING JOBS?";
     // HOW MANY WAITING JOBS
     $get_jobs = new job_new();
     $all_jobs = $get_jobs->get_from_hashrange($id_user);
     //echo "THIS IS REASSIGNER NODE";
     $first_list_length = 3;
     $first_server_jobs = array();
     if (count($user_servers) == count($not_busy_servers)) {
         $first_list_length = 0;
     }
     if ($all_jobs) {
         foreach ($all_jobs as $each_job) {
             $job_id = $each_job['id'];
             $server_name_split = explode("@", $job_id);
             $server_name = $server_name_split[0];
             if (!isset($first_server_jobs[$server_name])) {
                 $first_server_jobs[$server_name] = array();
             }
示例#3
0
 public function delete_job_new()
 {
     global $APP;
     if ($APP['ms']->kind != "no-messaging") {
         // SOME TYPE OF MESSAGING IS BEING USED
     } else {
         $check_new_job = new job_new();
         $check_new_job->get_from_hashrange($this->id_user, $this->id);
         if ($check_new_job->id != "undefined") {
             $check_new_job->delete();
         }
     }
     // END IF
 }
示例#4
0
文件: view.main.php 项目: hisapi/his
        echo "</ul>";
        echo "</td></tr>";
        echo "</table>";
    }
}
// end if (cluster map)
if (isset($_GET['v'])) {
    if ($_GET['v'] == "job-servers") {
        echo "<a name='queue'><h3>" . getTranslation("Job Queue/List of Jobs", $settings) . "</h3>";
        echo "<ul>";
        echo "<form action='?q={$qn}&v=job-servers' method='post'><input style='background-color:" . rcolor() . ";display:inline;' type='submit' value='";
        echo getTranslation("Refresh", $settings);
        echo "'/></form>";
        if ($APP['ms']->kind == "no-messaging") {
            echo "<ul>";
            $new_job = new job_new();
            $new_jobs = $new_job->get_from_hashrange($u->id_user);
            if ($new_jobs) {
                echo "<h3>";
                echo getTranslation("New Jobs", $settings);
                echo " ";
                echo "(";
                echo count($new_jobs);
                echo ")";
                echo "</h3>";
                foreach ($new_jobs as $new_job) {
                    echo getTranslation("Job ID", $settings);
                    echo ": ";
                    echo $new_job['id'];
                    echo "<br/>";
                }