aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'status.php')
-rw-r--r--status.php6
1 files changed, 5 insertions, 1 deletions
diff --git a/status.php b/status.php
index 37db751..f5b5da0 100644
--- a/status.php
+++ b/status.php
@@ -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);