There are several resources in a source pool (say one per server) that performs an operation to a local destination. When the operation is complete, the local result is shared with other servers. The resource is still busy. How can you retain the resource until another operation is completed?
- Create a new step immediately after the step that is running the build.
- Mark them both to run in parallel.
- Set the Shell to "ec-perl".
- Set the Resource to the resource that you want to mark as being in use.
- Paste the following Perl code into the Command block.
- Adjust the sleep time to reduce the overhead, based on how long you expect the build step to run.
This example uses xPath to find the parent of the current step, and wait for the parallel step to complete.
- Create a procedure with two steps that run in parallel.
- This example step uses three parameters for the procedure to characterize durations of a step. Create these parameters:
- CheckStepDuration - How often in seconds to check if the step has completed. For example fifteen minutes, 900 seconds.
- MaxStepDuration - How long in seconds until the monitored step will be timed out. For example two hours, 7200 seconds.
- WarningBeforeDuration - How long in seconds before the end of the monitored step the notifier is sent indicating the job will be timed out. For example thirty minutes, 1800 seconds.
- The first step calls the procedure to be monitored.
- The second step
- Has the notifiers for the about to fail message.
- Contains the following Perl code: