Skip to content

Action Timeout #5514

Answered by nzlosh
komalphadatare asked this question in Q&A
Discussion options

You must be logged in to vote

The below example shows the output of an action that timed out:

st2 run core.local cmd='sleep 10' timeout=5
...
id: 61c2ddf2d884a3a0c05c3f8b
action.ref: core.local
context.user: st2admin
parameters: 
  cmd: sleep 10
  timeout: 5
status: timeout
start_timestamp: Wed, 22 Dec 2021 08:12:34 UTC
end_timestamp: Wed, 22 Dec 2021 08:12:40 UTC
result: 
  error: Action failed to complete in 5 seconds
  failed: true
  return_code: -9
  stderr: ''
  stdout: ''
  succeeded: false

The status keyword indicates the action timed out. You can write a condtition in the next section to decide how the workflow should proceed.

      - when: <% task().status = "timeout" %>
        do: action_to_run_when_this_a…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by komalphadatare
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants