diff options
author | Jeffrey Armstrong <jeff@approximatrix.com> | 2021-05-17 14:18:22 -0400 |
---|---|---|
committer | Jeffrey Armstrong <jeff@approximatrix.com> | 2021-05-17 14:18:22 -0400 |
commit | a49c99b0167198deaf9bbed0b9fe7a188eac4d4b (patch) | |
tree | 70a0045769e0c67ce1bba5d585b2472a33322107 | |
parent | 5171892d542ef33986fe77139c68451e6fe4f9a3 (diff) | |
download | levitating-a49c99b0167198deaf9bbed0b9fe7a188eac4d4b.tar.gz levitating-a49c99b0167198deaf9bbed0b9fe7a188eac4d4b.zip |
Added ability to allow operations to fail and still be marked successful.
-rw-r--r-- | player/instructions.f90 | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/player/instructions.f90 b/player/instructions.f90 index a1aaa9d..07007a3 100644 --- a/player/instructions.f90 +++ b/player/instructions.f90 @@ -230,6 +230,21 @@ contains end subroutine get_task_name + function get_task_failure_okay(j, i) result(res) + implicit none + + class(json_file)::j + integer, intent(in)::i + character(*), intent(in)::component + + logical::res + + if(.not. get_task_logical(j, i, "failure_okay", res)) then + res = .false. + end if + + end function get_task_failure_okay + subroutine get_task_operation(j, i, op) use json_module implicit none @@ -345,6 +360,10 @@ contains end if + if(get_task_failure_okay(j, i) .and. .not. success) then + success = .true. + end if + end function perform_task subroutine perform_tasks(j, job_id) |