From a80d44b4510503790d4f975e3bcfc86eb8f6b96c Mon Sep 17 00:00:00 2001 From: Gery Debongnie Date: Fri, 4 Jul 2014 16:33:32 +0200 Subject: [PATCH] [FIX] makes sure the build order is FIFO instead of LIFO (for csn...) --- runbot/runbot.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/runbot/runbot.py b/runbot/runbot.py index adbd2f83..d7548348 100644 --- a/runbot/runbot.py +++ b/runbot/runbot.py @@ -287,7 +287,7 @@ class runbot_repo(osv.osv): # find sticky pending build if any, otherwise, last pending (by id, not by sequence) will do the job pending_ids = bo.search(cr, uid, dom + [('state', '=', 'pending'), ('branch_id.sticky', '=', True)], limit=1) if not pending_ids: - pending_ids = bo.search(cr, uid, dom + [('state', '=', 'pending')], order="id desc") + pending_ids = bo.search(cr, uid, dom + [('state', '=', 'pending')], order="sequence", limit=1) pending = bo.browse(cr, uid, pending_ids[0]) pending.schedule()