Commit 337a0457 authored by Leigh Stoller's avatar Leigh Stoller

Fix start/end time comparisons. Backwards.

parent 222f97c9
#!/usr/bin/perl -w
#
# Copyright (c) 2003-2012 University of Utah and the Flux Group.
# Copyright (c) 2003-2013 University of Utah and the Flux Group.
#
# {{{EMULAB-LICENSE
#
......@@ -88,7 +88,7 @@ usage()
my $query_result =
DBQueryFatal("select * from node_reservations ".
"where end is not null and ".
" UNIX_TIMESTAMP(end) < UNIX_TIMESTAMP(now())");
" UNIX_TIMESTAMP(end) > UNIX_TIMESTAMP(now())");
while (my $row = $query_result->fetchrow_hashref()) {
my $pid = $row->{'pid'};
......@@ -119,7 +119,7 @@ while (my $row = $query_result->fetchrow_hashref()) {
$query_result =
DBQueryFatal("select * from node_reservations ".
"where active=0 and start is not null and ".
" UNIX_TIMESTAMP(start) >= UNIX_TIMESTAMP(now()) ".
" UNIX_TIMESTAMP(now()) >= UNIX_TIMESTAMP(start) ".
"order by priority desc, created asc");
while (my $row = $query_result->fetchrow_hashref()) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment