aboutsummaryrefslogtreecommitdiff
path: root/player/instructions.f90
diff options
context:
space:
mode:
authorJeffrey Armstrong <jeff@approximatrix.com>2021-04-07 14:21:35 -0400
committerJeffrey Armstrong <jeff@approximatrix.com>2021-04-07 14:21:35 -0400
commitc493170e73506e974a0644452fc5a334c08171bc (patch)
tree7cfbbde04f5e3263092118dbabf843fbe68d93ad /player/instructions.f90
parent1de4bd52574599452f9e92c8e36381a4797563fb (diff)
downloadlevitating-c493170e73506e974a0644452fc5a334c08171bc.tar.gz
levitating-c493170e73506e974a0644452fc5a334c08171bc.zip
Fixed many issues related to reporting status. Initial debugging of titan upload handling.
Diffstat (limited to 'player/instructions.f90')
-rw-r--r--player/instructions.f9021
1 files changed, 18 insertions, 3 deletions
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)