Changeset 337


Ignore:
Timestamp:
03/29/10 13:36:34 (10 years ago)
Author:
sander
Message:

Different ordering of jobs. Sort by locked time to keep them cycling

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/server/www/app/controllers/jobs_controller.php

    r330 r337  
    505505                                ORDER BY `Request`.`own_factory` DESC, 
    506506                                        `Request`.`priority` ASC, 
     507                                        `Job`.`locked` ASC, 
    507508                                        `Request`.`created` ASC 
    508509                                LIMIT 0,1"); 
     
    565566                } 
    566567 
    567                 // If the priorities are also equal, look at the creation date 
    568                 return ($a['Request']['created'] < $b['Request']['created']) ? -1 : 1; 
     568                // If the priorities are also equal, look at the locked time 
     569                return ($a['Job']['locked'] < $b['Job']['locked']) ? -1 : 1; 
    569570        } 
    570571 
Note: See TracChangeset for help on using the changeset viewer.