Access variables of parallel steps by continuous polling

Hi,
I am working on a scenario where I need to cancel the release when a manual intervention step left
unattending for sometime after the MI step started.
I have a custom script running in parallel with the Manual intervention step. This step consists of a timer and continuously polls using
get_octopusvariable(‘Octopus.Step[step name].Status.Code’).
I am having issue in getting the value of the above code.
how can I access variables from steps which are running in parallel.

Hi @spannala
Welcome to the Octopus forum!

I believe the following PS script can help with your query:

The idea is to scan and find long running tasks and identify and cancel them. You can set some parameters such as max run time to fine tune how long a running task is allowed to go before cancelling.

You can also just mask out the cancel command and see what returns and manipulate the data as needed.

We have a list of system variables such as the one you mentioned to get the value of steps and processes:

If you need help with any of the above just let us know and we can jump in.

Kind regards,
Paraic

Thank you.
I used an API call to check the interruptions. It worked for me.
“{uri}/api/{spaces}/interruptions”

2 Likes

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.