fix waiting for scheduled task build to finish
Signed-off-by: Jakub Sokołowski <jakub@status.im>
This commit is contained in:
parent
8ec034c6b0
commit
d1ecc61707
|
@ -5,6 +5,7 @@ beacon_node_service_user_pass: '{{ ansible_date_time.epoch | password_hash("sha5
|
|||
beacon_node_service_home: 'C:/Users/{{ beacon_node_service_user_name }}'
|
||||
beacon_node_service_path: '{{ beacon_node_service_home }}/{{ beacon_node_service_name }}'
|
||||
beacon_node_service_bin_path: '{{ beacon_node_service_path }}/bin'
|
||||
beacon_node_service_exe: '{{ beacon_node_service_bin_path }}/nimbus_beacon_node.exe'
|
||||
|
||||
beacon_node_repo_url: 'https://github.com/status-im/nimbus-eth2.git'
|
||||
beacon_node_repo_branch: 'stable'
|
||||
|
|
|
@ -11,21 +11,30 @@
|
|||
triggers:
|
||||
- type: 'daily'
|
||||
start_boundary: '2021-01-01T01:00:00'
|
||||
# Start it right away so we have the binary to run.
|
||||
- type: registration
|
||||
state: 'present'
|
||||
enabled: true
|
||||
multiple_instances: 2 # Wait for running task
|
||||
start_when_available: true
|
||||
disallow_start_if_on_batteries: false
|
||||
stop_if_going_on_batteries: false
|
||||
|
||||
- name: Check if binary exists
|
||||
win_stat:
|
||||
path: '{{ beacon_node_service_exe }}'
|
||||
register: beacon_node_exe
|
||||
|
||||
# Start it right away so we have the binary to run.
|
||||
- name: Start the new scheduled task
|
||||
win_shell: 'Start-ScheduledTask -TaskName {{ beacon_node_service_name }}-build'
|
||||
when: not beacon_node_exe.stat.exists
|
||||
|
||||
- name: Wait for the node build to finish (SLOW)
|
||||
win_scheduled_task_stat:
|
||||
name: '{{ beacon_node_service_name }}-build'
|
||||
when: not beacon_node_exe.stat.exists
|
||||
register: task_stat
|
||||
until: |
|
||||
(task_stat.state is defined and
|
||||
task_stat.state.status != "task_state_running"
|
||||
) or (task_stat.task_exists == false)
|
||||
retries: 30
|
||||
task_stat.state is defined and
|
||||
task_stat.state.status != "TASK_STATE_RUNNING"
|
||||
retries: 50
|
||||
delay: 30
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
winsw_service_name: 'Nimbus Beacon Node'
|
||||
winsw_service_description: 'Nimbus Eth2 Beacon Node'
|
||||
winsw_service_user: 'nimbus'
|
||||
winsw_service_exe_path: '{{ beacon_node_service_bin_path }}/nimbus_beacon_node.exe'
|
||||
winsw_service_exe_path: '{{ beacon_node_service_exe }}'
|
||||
winsw_service_arguments: |
|
||||
--network={{ beacon_node_network }}
|
||||
--data-dir={{ beacon_node_data_path }}
|
||||
|
|
Loading…
Reference in New Issue