You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@vcl.apache.org by jf...@apache.org on 2009/06/17 18:38:34 UTC
svn commit: r785710 - /incubator/vcl/trunk/web/.ht-inc/utils.php
Author: jfthomps
Date: Wed Jun 17 16:38:34 2009
New Revision: 785710
URL: http://svn.apache.org/viewvc?rev=785710&view=rev
Log:
VCL-143
utils.php:
-modified isAvailable to consider computers that are being reloaded to be unavailable - previously, it was causing a problem with reloads for block reservations
Modified:
incubator/vcl/trunk/web/.ht-inc/utils.php
Modified: incubator/vcl/trunk/web/.ht-inc/utils.php
URL: http://svn.apache.org/viewvc/incubator/vcl/trunk/web/.ht-inc/utils.php?rev=785710&r1=785709&r2=785710&view=diff
==============================================================================
--- incubator/vcl/trunk/web/.ht-inc/utils.php (original)
+++ incubator/vcl/trunk/web/.ht-inc/utils.php Wed Jun 17 16:38:34 2009
@@ -3294,17 +3294,12 @@
$usedComputerids = array();
$query = "SELECT DISTINCT rs.computerid "
. "FROM reservation rs, "
- . "request rq, "
- . "user u "
+ . "request rq "
. "WHERE '$startstamp' < (rq.end + INTERVAL 900 SECOND) AND "
. "'$endstamp' > rq.start AND "
. "rq.id != $requestid AND "
. "rs.requestid = rq.id AND "
- . "rq.stateid != 1 AND "
- . "rq.stateid != 5 AND "
- . "rq.stateid != 12 AND "
- . "rq.userid = u.id AND "
- . "u.unityid != 'vclreload'";
+ . "rq.stateid NOT IN (1, 5, 12)"; # deleted, failed, complete
$qh = doQuery($query, 130);
while($row = mysql_fetch_row($qh)) {
array_push($usedComputerids, $row[0]);