diff options
author | Jeffrey Armstrong <jeff@approximatrix.com> | 2021-04-05 16:30:15 -0400 |
---|---|---|
committer | Jeffrey Armstrong <jeff@approximatrix.com> | 2021-04-05 16:30:15 -0400 |
commit | aef2c3629718705975a181a345d3908776b14af5 (patch) | |
tree | e17ce550c12f1bd173a3e5a39f6388ca300e6651 /player/player.F90 | |
parent | 15837a5fd46a1c9051d54138ba3ade26c74091f1 (diff) | |
download | levitating-aef2c3629718705975a181a345d3908776b14af5.tar.gz levitating-aef2c3629718705975a181a345d3908776b14af5.zip |
Fixed checkin json to return a name of instructions needed and a job id
Diffstat (limited to 'player/player.F90')
-rw-r--r-- | player/player.F90 | 30 |
1 files changed, 21 insertions, 9 deletions
diff --git a/player/player.F90 b/player/player.F90 index 0eb5a72..ddce8cb 100644 --- a/player/player.F90 +++ b/player/player.F90 @@ -12,10 +12,13 @@ use wsa_network, only: windows_network_startup => startup implicit none character(len=1024)::url - type(json_file)::j - logical::work_to_do, json_available + type(json_file)::j_checkin, j_instructions + logical::work_to_do, checkin_json_available, instr_json_available integer::i_task + + integer::job_id + character(128)::instruction_name #ifdef WINDOWS call windows_network_startup() @@ -30,15 +33,24 @@ implicit none ! Check in for work call get_check_in_url(url) - json_available = request_json(url, j) - if(json_available) then - work_to_do = work_available(j) + checkin_json_available = request_json(url, j_checkin) + if(checkin_json_available) then + work_to_do = work_available(j_checkin) end if if(work_to_do) then + job_id = get_job_id_from_checkin(j_checkin) + call get_instruction_name_from_checkin(j_checkin, instruction_name) + + call get_instruction_url(url, instruction_name) + instr_json_available = request_json(url, j_instructions) - ! Task loop - call perform_tasks(j) + if(instr_json_available) then + ! Task loop + call perform_tasks(j_instructions, job_id) + + call destroy_instructions(j_instructions) + end if else @@ -54,8 +66,8 @@ implicit none #endif ! Destroy any existing json - if(json_available) then - call destroy_instructions(j) + if(checkin_json_available) then + call j_checkin%destroy() end if end do |