Merge lp:~camptocamp/openerp-connector/7.0-assign_jobs_with_priority-1252681 into lp:~openerp-connector-core-editors/openerp-connector/7.0

Proposed by Guewen Baconnier @ Camptocamp
Status: Merged
Merged at revision: 599
Proposed branch: lp:~camptocamp/openerp-connector/7.0-assign_jobs_with_priority-1252681
Merge into: lp:~openerp-connector-core-editors/openerp-connector/7.0
Diff against target: 13 lines (+2/-1)
1 file modified
connector/queue/model.py (+2/-1)
To merge this branch: bzr merge lp:~camptocamp/openerp-connector/7.0-assign_jobs_with_priority-1252681
Reviewer Review Type Date Requested Status
OpenERP Connector Core Editors Pending
Review via email: mp+195739@code.launchpad.net

Commit message

[FIX] assignment of jobs to workers respect the priority of the jobs

Description of the change

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'connector/queue/model.py'
2--- connector/queue/model.py 2013-06-26 05:47:44 +0000
3+++ connector/queue/model.py 2013-11-19 10:17:15 +0000
4@@ -282,7 +282,8 @@
5 sql = ("SELECT id FROM queue_job "
6 "WHERE worker_id IS NULL "
7 "AND state not in ('failed', 'done') "
8- "AND active = true ")
9+ "AND active = true "
10+ "ORDER BY eta NULLS LAST, priority, date_created ")
11 if max_jobs is not None:
12 sql += ' LIMIT %d' % max_jobs
13 sql += ' FOR UPDATE NOWAIT'