Hi there !
I was hoping someone could enlighten me, as to how i can grab information from inside a function (that runs inside a foreach loop several times).
The script works as intended, the only somewhat unimportant, but quite annoying detail is that i cant figure out how to grab the variable $retryCount (which comes from the Function) and print it out with the other result.
I just want to know, in the final output file, how many retries there have been, for each attempt.
If the script fails on $framworkcommand1, it throws the loop, stopping the script from attempting the other commands, which is fine. Im not trying to collect “amount of retries” for every $framworkcommand(1-4).
I would asume, that my correction:
return $response, $retryCount
From originally just:
return $response
Would allow me to grab the variable.
It does not
please help! ^^
Link to Github Gist with the script:
Best regards
Jonatan