Replies: 1 comment
-
Any errors would be helpful here. Also properly formatting the yaml would make it much easier to read. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
not able to achieve retry a task if it fails. Workflow is getting stuck for below code.
Yaml Code:
version: 1.0
tasks:
[317, 39]
do_thing:
action: core.remote
input:
cmd: ls deepak.txt
hosts: 172.17.x.y
cwd: /opt/container_mange/
next:
# #629e47
- do:
- success
when: <% succeeded() %>
- when: <% failed() %>
publish:
- do_thing_iteration: <% ctx().do_thing_iteration + 1 %>
do:
- sleep_and_try_again
- do:
- task2
when: <% failed() and ctx().do_thing_iteration >= ctx().do_thing_count %>
[435, 234]
success:
action: core.echo
input:
message: success
[618, 147]
task2:
action: core.local
input:
cmd: st2 execution cancel <% ctx(st2).action_execution_id %>
[97, 220]
sleep_and_try_again:
action: core.local
input:
cmd: sleep <% ctx().do_thing_retry_delay %>
next:
- do:
- do_thing
vars:
Beta Was this translation helpful? Give feedback.
All reactions