<< Back to previous view |
[QB-3004] Allow user to keep jobs queued programitcally
|
|
Status: | Closed |
Project: | QuickBuild |
Component/s: | None |
Affects Version/s: | None |
Fix Version/s: | None |
Type: | New Feature | Priority: | Major |
Reporter: | John Fedorkiw | Assigned To: | Robin Shen |
Resolution: | Won't Fix | Votes: | 0 |
Remaining Estimate: | Unknown | Time Spent: | Unknown |
Original Estimate: | Unknown | ||
Environment: | Quickbuild Software |
Description |
We would like to be able to be able to grammatically keep a job queued.
I have a configuration that I want to run concurrently but block concurrent runs for build requests with identical variables. I don't want to throw out the request (as I could easily do in a Pre-Queue Script) but instead want to allow the request to be queued up but not run until the duplicate request is finished. |
Comments |
Comment by John Fedorkiw [ 28/Jun/17 03:45 PM ] |
..programmatically not "grammatically". We want to programmatically keep a job queued). |
Comment by Robin Shen [ 20/Jan/18 10:55 AM ] |
To do this, edit pre-queue script like below:
groovy: request.variables.timestamp = new Date().toString() This way the build request has an unique variable and will not be considered identical |
Comment by John Fedorkiw [ 24/Jan/18 06:41 PM ] |
I do not think this solves the underlying problem.
A configuration can be set to either run concurrently or not. If it is set to run concurrently ALL queued jobs will be ran at the same time. I would like to run a subset of the queued jobs concurrently but not all of them Example: We have a configuration that mirrors data from one location to another. We use it to mirror data from <HOME> to locations <A> and <B>. I want to run mirrors from <HOME> -> <A> and <Home> -> <B> concurrently but never allow multiple runs from, <HOME> -> <A> to run at the same time. Is there a way to accomplish this ? If not can a way be added ? In the ticket I proposed we are able to programmatically determine if a job is able to run or if it should stay queued but perhaps there is another way. |
Comment by Robin Shen [ 25/Jan/18 12:21 AM ] |
This can be solved with grid resource with below procedure:
1. define two resources mirrorA, and mirrorB, with ONE count respectively on some node 2. define a variable say "mirrorDestination", and prompt as "selection box", with choices as: ${groovy: def choices = ""; for (resource: com.pmease.quickbuild.entitymanager.ResourceManager.instance.getAll()) { if (resource.getName.startsWith("mirror")) choices += resource.getName() + ","; \} } 3. define node selection setting of your data mirror step to be "run on node with specified resource", and then define the resource as: ${vars.getValue("mirrorDestination")} 4. Also pass value of variable mirrorDestination to your data mirror step so that you can mirror data to desired destination |