<< Click to Display Table of Contents >> Navigation: 5. Detailed description of the Actions > 5.22. TA - Distributed Computations > 5.22.2. Wait for the termination of Jenkins Jobs |
Icon:
Function: waitJenkins
Property window:
Short description:
Wait for the completion of Anatella Jobs running in Jenkins.
Long Description:
The “Loop Jenkins” action (see section 5.22.1) does not wait for the completion of the execution of the Anatella graphs running inside Jenkins. You can use the waitJenkins action to wait for the completion of the graphs running inside Jenkins.
The combination of the loopJenkins action and the waitJenkins action allows to obtain a behavior similar to the loopAnatellaGraphAdv action (see section 5.21.6.), the loopAnatellaGraph (see section 5.21.5) action or the ParallelRun Action (see section 5.3.3.) that are waiting for the executed (sub-) graphs to terminate before proceeding any further.
All the Anatella jobs that were added inside Jenkins using the loopJenkins action are uniquely identified through an “_Anatella_Job_ID”. This “_Anatella_Job_ID” is given as output of the loopJenkins action: For example:
The waitJenkins action is waiting for the completion of all the jobs whose “_Anatella_Job_ID” is given on the input pin (specified using the Parameter P1). If Anatella sees an un-finished job X, it re-contacts Jenkins at regular intervals (this procedure is named “polling”), to know if the job X is finally finished. The delay between 2 “contacts” (i.e. the “polling interval”) is the Parameter P2 (in seconds). After Y “contacts” (i.e. after Y “polling” - Y is Parameter P3), Anatella will display inside the low window some statistics: For example (when Parameter P3>0), you’ll see inside the Log Window:
Running... (10/5/18 16:54:04) #Total=2 ; #Pending=2 (#Running=1 ; #InQueue=1) ; #Complete=0 (#Success=0 ; #QueryFailure=0 ; #Fail=0) #Total=2 ; #Pending=2 (#Running=1 ; #InQueue=1) ; #Complete=0 (#Success=0 ; #QueryFailure=0 ; #Fail=0) #Total=2 ; #Pending=1 (#Running=1 ; #InQueue=0) ; #Complete=1 (#Success=1 ; #QueryFailure=0 ; #Fail=0) #Total=2 ; #Pending=1 (#Running=1 ; #InQueue=0) ; #Complete=1 (#Success=1 ; #QueryFailure=0 ; #Fail=0) #Total=2 ; #Pending=0 (#Running=0 ; #InQueue=0) ; #Complete=2 (#Success=2 ; #QueryFailure=0 ; #Fail=0)
Interactive Run: Success!(finished at 10/5/18 16:54:36 after 31.68 seconds - Peak Memory Consumption: 144 MB) |
As ouput of the waitJenkins action, you get a table that gives you the final status of the monitored jobs. For example:
If the final job status (displayed inside the “_JenkinsFinalJobStatus” column here: ) is “Query Error: Build Information is too old and has been discarded by Jenkins”, it means that you have to increase the value of the Jenkins configuration parameter named “Days to keep builds”: See the section 5.21.1.1 (and more precisely the step 1.6) to kown how to do so.