Class BuildBlockerQueueTaskDispatcher
- All Implemented Interfaces:
ExtensionPoint
-
Nested Class Summary
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncanRun(Queue.Item item) Called wheneverQueueis considering ifQueue.Itemis ready to execute immediately (which doesn't necessarily mean that it gets executed right away — it's still subject to executor availability), or if it should be considered blocked.canTake(Node node, Queue.BuildableItem item) Methods inherited from class hudson.model.queue.QueueTaskDispatcher
all, canTake
-
Constructor Details
-
BuildBlockerQueueTaskDispatcher
public BuildBlockerQueueTaskDispatcher()
-
-
Method Details
-
canRun
Called whenever
Queueis considering ifQueue.Itemis ready to execute immediately (which doesn't necessarily mean that it gets executed right away — it's still subject to executor availability), or if it should be considered blocked.Compared to
canTake(hudson.model.Node, hudson.model.Queue.BuildableItem), this version tells Jenkins that the task is simply not ready to execute, even if there's available executor. This is more efficient thancanTake(hudson.model.Node, hudson.model.Queue.BuildableItem), and it sends the right signal to Jenkins so that it won't useCloudto try to provision new executors.Vetos are additive. When multiple
QueueTaskDispatchers are in the system, the task is considered blocked if any one of them returns a non-null value. (This relationship is also the same with built-in check logic.)If a
QueueTaskDispatcherreturns non-null from this method, the task is placed into the 'blocked' state, and generally speaking it stays in this state for a few seconds before its state gets re-evaluated. If aQueueTaskDispatcherwants the blockage condition to be re-evaluated earlier, callQueue.scheduleMaintenance()to initiate that process.- Overrides:
canRunin classQueueTaskDispatcher- Returns:
- null to indicate that the item is ready to proceed to the buildable state as far as this
QueueTaskDispatcheris concerned. Otherwise return an object that indicates why the build is blocked. - Since:
- 1.427
-
canTake
- Overrides:
canTakein classQueueTaskDispatcher
-