aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLiam McLoughlin <hexxeh@hexxeh.net>2011-07-08 19:47:07 +0100
committerLiam McLoughlin <hexxeh@hexxeh.net>2011-07-08 19:47:07 +0100
commit6e55dab2366ee4acb427837496261478c76e35e6 (patch)
treecfeae4834d4cf42464c1424d0cc50162577c5c94 /status.php
parentDelete config after the build has finished in daemon (diff)
downloadgentoaster-6e55dab2366ee4acb427837496261478c76e35e6.tar.gz
gentoaster-6e55dab2366ee4acb427837496261478c76e35e6.tar.bz2
gentoaster-6e55dab2366ee4acb427837496261478c76e35e6.zip
Changed Gearman test client to accept config path as an argument, added waiting case in status checker
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);