diff options
Diffstat (limited to 'status.php')
-rw-r--r-- | status.php | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -12,7 +12,11 @@ $status = $client->jobStatus($handle); if($status[0]) { - echo "Running: " . ($status[1] ? "true" : "false") . ", progress: " . ceil($status[2]/$status[3]*100) . "%, numerator: " . $status[2] . ", denomintor: " . $status[3] . "\n"; + if($status[3] != 0) { + echo "Running: " . ($status[1] ? "true" : "false") . ", progress: " . ceil($status[2]/$status[3]*100) . "%, numerator: " . $status[2] . ", denomintor: " . $status[3] . "\n"; + } else { + echo "Task has not yet been processed\n"; + } } else { $result = mysql_query("SELECT returncode, result FROM builds WHERE id = '".mysql_real_escape_string($argv[1])."'"); $jobres = mysql_fetch_array($result); |