示例#1
0
<?php

/*
 * get_queue_info
 * Created on: Apr 8, 2013 11:06:30 AM
 * 
 * Copyright 2013 EnginSoft S.p.A.
 * All rights reserved
 */
include_once 'neurocloud/lib/common.php';
if (isset($_GET['jobname'])) {
    $jobname = $_GET['jobname'];
    echo get_queue_info($jobname);
} else {
    echo "ERROR";
}
示例#2
0
        // calculate space used by temp dir + results
        $usedspace = get_job_disk_usage(OC_User::getUser(), $file, $job);
        if (!$usedspace) {
            $usedspace = "--";
        }
        $jobinfo['usedspace'] = $usedspace;
        // get_job_status returned FINISHED or KILLED, we save that info in the job JSON
        save_job_info($file, $job, $jobinfo);
        insert_job_log($file, $job, "{$status}. Used disk space: {$usedspace}");
    }
} elseif ($status === JobStatus::$UNKNOWN) {
    $jobinfo['status'] = $status;
    save_job_info($file, $job, $jobinfo);
} else {
    /* Job is RUNNING */
    $queueinfo = get_queue_info($qsub_jobname);
    $sgequeued = $queueinfo[0];
    $sgerunning = $queueinfo[1];
}
$showoutputjs = "javascript:show_output('" . $outputid . "', '" . $output_file . "')";
$killjs = OC_Helper::linkTo("neurocloud", "ajax/kill_job.php", array("study" => $file, "jobid" => $job, "redirect" => 1));
$refreshstatusjs = "javascript:refresh_job_status('" . $rowid . "','" . $file . "','" . $job . "','" . $outputid . "')";
$showjobinfojs = "javascript:show_output('" . $outputid . "','" . get_job_info_file($file, $job) . "', true)";
#$queueinfojs = "javascript:show_queue_info('" . $outputid . "','". $jobinfo['qsub_jobname'] . "', true)";
$deletejs = "javascript:delete_results('" . $rowid . "','" . $file . "','" . $job . "')";
$script = isset($jobinfo["script"]) ? basename($jobinfo["script"]) : false;
$params = array("study" => $file, "script" => $script, "jobid" => $job, "mode" => "remote");
$rerun_link = OC_Helper::linkTo("neurocloud", "execute.php", $params);
if ($print_tr) {
    ?>