Commit fee42090 authored by Mike Hibler's avatar Mike Hibler

With -l, order list in the priority in which reservations will be filled.

That sort order is: reservations that need nodes, priority, creation date.
It used to be: priority, pid.

The new order makes the most sense for reservations that still need nodes,
so you can see easily where they are going to land first.
parent 76aefec7
......@@ -190,13 +190,13 @@ else {
#
if ($list) {
my $query_result =
DBQueryFatal("select * from node_reservations ".
"order by priority desc, pid asc");
DBQueryFatal("select *,(count>0) as needed from node_reservations ".
"order by needed desc, priority desc, created asc");
if ($query_result->numrows) {
printf("%-18s %-4s %-3s %-10s %-18s %-3s %s\n",
"Project", "Need", "Got", "Creator", "Created", "Pri", "Types");
print "-------------------------------------------------------------\n";
print "---------------------------------------------------------------------\n";
}
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