From c493170e73506e974a0644452fc5a334c08171bc Mon Sep 17 00:00:00 2001 From: Jeffrey Armstrong Date: Wed, 7 Apr 2021 14:21:35 -0400 Subject: Fixed many issues related to reporting status. Initial debugging of titan upload handling. --- player/instructions.f90 | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) (limited to 'player/instructions.f90') diff --git a/player/instructions.f90 b/player/instructions.f90 index 273c379..a3dc97a 100644 --- a/player/instructions.f90 +++ b/player/instructions.f90 @@ -34,9 +34,14 @@ contains character(len=:), allocatable::json_string_value logical::found - call j%get("idle", json_string_value, found) + call j%get("status", json_string_value, found) - work_available = .not. found + if(found) then + Print *, "Checkin status: "//json_string_value + work_available = (json_string_value /= "idle") + else + work_available = .false. + end if end function work_available @@ -140,7 +145,7 @@ contains character(*), intent(out)::label write(label, '(A6,I3,A2)') "tasks(", i, ")." - label = label//trim(component) + label = trim(label)//trim(component) end subroutine task_component @@ -242,6 +247,15 @@ contains call get_task_operation(j, i, operation) + Print *, "Task: ", i + Print *, "Operation: "//trim(operation) + + if(len_trim(operation) == 0) then + success = .false. + capture_filename => null() + return + end if + found = .true. capture_filename => null() @@ -326,6 +340,7 @@ contains task_count = get_task_count(j) + ! Remember to zero-index your json! do i = 1, task_count call get_status_url(job_id, i, url, status=STATUS_STARTING) -- cgit v1.2.3