diff options
author | Liam McLoughlin <hexxeh@hexxeh.net> | 2011-07-08 19:47:07 +0100 |
---|---|---|
committer | Liam McLoughlin <hexxeh@hexxeh.net> | 2011-07-08 19:47:07 +0100 |
commit | 6e55dab2366ee4acb427837496261478c76e35e6 (patch) | |
tree | cfeae4834d4cf42464c1424d0cc50162577c5c94 /status.php | |
parent | Delete config after the build has finished in daemon (diff) | |
download | gentoaster-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.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); |