From 0f55145586f6502181739520753e865e2035bce3 Mon Sep 17 00:00:00 2001 From: HummyPkg Date: Sun, 10 Nov 2019 21:06:14 +0000 Subject: [PATCH] Sort queue by date (after priority) --- webif/lib/auto/deq | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/webif/lib/auto/deq b/webif/lib/auto/deq index 7d9b52ce..435478ad 100755 --- a/webif/lib/auto/deq +++ b/webif/lib/auto/deq @@ -155,7 +155,10 @@ proc ::auto::pending {} { set ba [$b get action] if {$aa ni $::auto::plugins} { return 0 } if {$ba ni $::auto::plugins} { return 0 } - return $($::auto::plugins($aa) - $::auto::plugins($ba)) + set ap $::auto::plugins($aa) + set bp $::auto::plugins($ba) + if {$ap != $bp} { return $($ap - $bp) } + return $([$b get id] - [$a get id]) }] [queue pending]] }