If you were logged in you would be able to see more operations.
|
|
|
QuickBuild
Created: 13/Jun/12 03:23 PM
Updated: 27/Dec/12 12:45 PM
|
|
|
Component/s: |
None
|
Affects Version/s: |
4.0.20
|
Fix Version/s: |
None
|
|
Original Estimate:
|
Unknown
|
Remaining Estimate:
|
Unknown
|
Time Spent:
|
Unknown
|
|
It would be nice to have script access to the count of a resource that is available, without altering the resource count (aka grabbing the resource).
|
Description
|
It would be nice to have script access to the count of a resource that is available, without altering the resource count (aka grabbing the resource). |
Show » |
|
groovy:
import com.pmease.quickbuild.*
import com.pmease.quickbuild.entitymanager.*
def resource = ResourceManager.instance.get("name of the resource")
def requests = BuildEngine.instance.getBuildRequests(null)
logger.info("Available resource count: " + (resource.getCount() - resource.getUsedCount(requests))