Skip to content

enhance(drp-community-content): Add task breakout template and param

Shane Gibson requested to merge loop-breakout into v4

In many cases, some Tasks are very long lived waiting on a service to complete tasks. In these cases, it's may be necessary to break out of the waiting loop construct if the service being waited on fails to return correctly.

Adds a template that can be included in various BASH Tasks which provides two mechanisms to "break out" of a shell loop construct. In all cases, the break out mechanism relies on the Shell Loop constructing running via short iterative sleep cycles (eg "sleep 5", with a max count of 500 cycles). In this case every sleep cycle, one of the following two break outs can be implemented:

  1. set the Machine runnable state to false
  2. set the Machine Param task-breakout-of-loop to true

Review the Param or Template for additional documentation on how to place the template in code to utilize this feature.

Merge request reports