I have two jobs test_priority_high (priority: 1) and test_priority_low (priority: 5) both do "sleep 70" and build periodically (* * * * *) which means that there is always one of each in the queue. Both jobs are forced to running on the same executor.

I would expect that only the test_priority_high would be executed as it has higher priority and there is always one in the queue when the executor is free. Not the jobs are run in the order in which they are started.

This is what the log says (started with FINE but switched to FINER):

New Item: Id: 13626, JobName: test_priority_high, jobGroupId: -1, reason: , priority: 1, weight: 1.0, status: WAITING
Mar 27, 2014 7:25:51 AM FINE PrioritySorter.Queue.Items
New Item: Id: 13627, JobName: test_priority_low, jobGroupId: -1, reason: , priority: 5, weight: 5.0, status: WAITING
Mar 27, 2014 7:25:51 AM FINE PrioritySorter.Queue.Items
Buildable: Id: 13626, JobName: test_priority_high, jobGroupId: -1, reason: , priority: 1, weight: 1.0, status: BUILDABLE
Mar 27, 2014 7:25:51 AM FINE PrioritySorter.Queue.Items
Buildable: Id: 13627, JobName: test_priority_low, jobGroupId: -1, reason: , priority: 5, weight: 5.0, status: BUILDABLE
Mar 27, 2014 7:26:01 AM FINE PrioritySorter.Queue.Items
Starting: Id: 13626, JobName: test_priority_high, jobGroupId: -1, reason: , priority: 1, weight: 1.0, status: BUILDABLE
Mar 27, 2014 7:26:51 AM FINE PrioritySorter.Queue.Items
New Item: Id: 13628, JobName: test_priority_high, jobGroupId: -1, reason: , priority: 1, weight: 1.0, status: WAITING
Mar 27, 2014 7:26:51 AM FINE PrioritySorter.Queue.Items
Buildable: Id: 13628, JobName: test_priority_high, jobGroupId: -1, reason: , priority: 1, weight: 1.0, status: BUILDABLE
Mar 27, 2014 7:27:16 AM FINE PrioritySorter.Queue.Items
Starting: Id: 13627, JobName: test_priority_low, jobGroupId: -1, reason: , priority: 5, weight: 5.0, status: BUILDABLE
Mar 27, 2014 7:27:51 AM FINE PrioritySorter.Queue.Items
New Item: Id: 13629, JobName: test_priority_low, jobGroupId: -1, reason: , priority: 5, weight: 5.0, status: WAITING
Mar 27, 2014 7:27:51 AM FINE PrioritySorter.Queue.Items
Buildable: Id: 13629, JobName: test_priority_low, jobGroupId: -1, reason: , priority: 5, weight: 5.0, status: BUILDABLE
Mar 27, 2014 7:28:26 AM FINE PrioritySorter.Queue.Items
Starting: Id: 13628, JobName: test_priority_high, jobGroupId: -1, reason: , priority: 1, weight: 1.0, status: BUILDABLE
Mar 27, 2014 7:28:51 AM FINER PrioritySorter.Queue.Items
New Item: Id: 13630, JobName: test_priority_high, jobGroupId: -1, reason: , priority: 1, weight: 1.0, status: WAITING
Using priority taken directly from the Job

Mar 27, 2014 7:28:51 AM FINE PrioritySorter.Queue.Items
Buildable: Id: 13630, JobName: test_priority_high, jobGroupId: -1, reason: , priority: 1, weight: 1.0, status: BUILDABLE
Mar 27, 2014 7:29:39 AM FINE PrioritySorter.Queue.Items
Starting: Id: 13629, JobName: test_priority_low, jobGroupId: -1, reason: , priority: 5, weight: 5.0, status: BUILDABLE
Mar 27, 2014 7:29:51 AM FINER PrioritySorter.Queue.Items
New Item: Id: 13631, JobName: test_priority_low, jobGroupId: -1, reason: , priority: 5, weight: 5.0, status: WAITING
Using priority taken directly from the Job

Mar 27, 2014 7:29:51 AM FINE PrioritySorter.Queue.Items
Buildable: Id: 13631, JobName: test_priority_low, jobGroupId: -1, reason: , priority: 5, weight: 5.0, status: BUILDABLE
Mar 27, 2014 7:30:49 AM FINE PrioritySorter.Queue.Items
Starting: Id: 13630, JobName: test_priority_high, jobGroupId: -1, reason: , priority: 1, weight: 1.0, status: BUILDABLE
Mar 27, 2014 7:30:51 AM FINER PrioritySorter.Queue.Items

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira

--
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to