Author: fapeeler
Date: Thu Aug 12 16:48:52 2010
New Revision: 984861

URL: http://svn.apache.org/viewvc?rev=984861&view=rev
Log:
VCL-254

get_managementnode_block_requests
- added check for skip flag
- push some of the time checks onto the mysql server, only pull timeslots that 
have either expired or will occur within 6hrs


Modified:
    incubator/vcl/trunk/managementnode/lib/VCL/utils.pm

Modified: incubator/vcl/trunk/managementnode/lib/VCL/utils.pm
URL: 
http://svn.apache.org/viewvc/incubator/vcl/trunk/managementnode/lib/VCL/utils.pm?rev=984861&r1=984860&r2=984861&view=diff
==============================================================================
--- incubator/vcl/trunk/managementnode/lib/VCL/utils.pm (original)
+++ incubator/vcl/trunk/managementnode/lib/VCL/utils.pm Thu Aug 12 16:48:52 2010
@@ -7583,12 +7583,15 @@ sub get_management_node_blockrequests {
        
        LEFT JOIN
        blockTimes ON (
-               blockRequest.id = blockTimes.blockRequestid AND
-               blockRequest.status = 'accepted'
+               blockRequest.id = blockTimes.blockRequestid 
        )
        
        WHERE
-       blockRequest.managementnodeid = $managementnode_id
+       blockRequest.managementnodeid = $managementnode_id AND
+        blockRequest.status = 'accepted' AND
+       blockTimes.skip = '0' AND
+        (blockTimes.start < (NOW() + INTERVAL 360 MINUTE ) OR
+        blockTimes.end < NOW() )
    ";
 
        # Call the database select subroutine


Reply via email to