Example #1
0
File: index.php Project: hisapi/his
     $check_job_id = new job_id_user();
     $check_job_id->get_from_hashrange($new_job_id->id_user, $new_job_id->id);
     if ($check_job_id->id_status == "new") {
         $slow_msg = "<br/>";
         $slow_msg .= getTranslation("Consider clicking the stopwatch icon at top and change function to 'Fast Response' instead of the current value 'Slow Response'.  Fast Response will guarantees job submission.", $settings);
         $alert_messages = "<center><span style='background-color:red;color:white;'>" . getTranslation("Job submission", $settings) . " #" . str_replace("<", "&lt;", $this_job_id) . " " . getTranslation("was cancelled", $settings) . " ({$cnt}).<br/>" . getTranslation("The job cluster was too busy or not responsive.", $settings) . $slow_msg . "</span></center>";
         if (($mode_xml || $mode_cxml) && !$mode_server && !$mode_output) {
             $trigger_wait_message = true;
         }
     }
     // END IF
 }
 // END IF
 if ($APP['ms']->kind != "no-messaging" && !$messaging_complete) {
     // WAIT FOR MESSAGE QUEUE RESPONSE
     $message = $new_job_id->receive("replyfrom_" . $selected_job_server_name);
     $all_messages .= $message . "<br/>\n";
     if (($message . "" == "NULL" || strlen($message . "") == 0) && $cnt < 15) {
         sleep(1);
         continue;
     }
     $message_xml = xmlToArray(simplexml_load_string($message));
     $collected_job_id = new job_id_user();
     $collected_job_id->fromobjectxml($message_xml);
     if ($collected_job_id->id == $id_submitted_job) {
         $new_job_id->fromobjectxml($message_xml);
         $messaging_complete = True;
     } else {
         $all_messages .= "received a wrong message: " . htmlspecialchars($message);
         // we collected a message from anoth/er job - re-post the message to the queue so we don't end up stealing other jobs' responses
         $collected_job_id->send("replyfrom_" . $selected_job_server_name, $message);