make priority work
Former-commit-id: 391257fb17ccb7c71c8ab5ba231af5f234e1602d
This commit is contained in:
@@ -51,7 +51,7 @@ fn request_job(shared: State<SharedState>) -> Result<Json<Value>, NotFound<Strin
|
||||
.filter(|x| x.status == EStatus::Queued).cloned()
|
||||
.collect();
|
||||
|
||||
list.sort_by(|a, b| b.description.length.cmp(&a.description.length));
|
||||
list.sort_by(|a, b| (b.description.priority, b.description.length).cmp(&(a.description.priority, a.description.length)));
|
||||
|
||||
let job = list.get(0);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user