Commit d6695199 authored by JANON Alexis's avatar JANON Alexis

main.yml: the 'run' task is now async with a timeout

This crates a pseudo-timeout task: the task is async, but still blocking thanks
to the 'poll' argument which checks on the task every 60 seconds.
The async "RUN_TIMEOUT" (supplied by the caller) will fail the task once it hits
the maximum allowed duration. This will then be handled by the 'always' block
which will retrieve the results properly, even if the experiment has not ended.
parent 74301396
......@@ -49,6 +49,8 @@
- "{{ ansible_env.HOME }}/repo/experiment/run"
- "{{ base_dir }}"
- "{{ results_dir }}"
async: "{{ RUN_TIMEOUT }}"
poll: 60
always:
- name: Teardown experiment
command:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment