aboutsummaryrefslogtreecommitdiff
path: root/captain/api.f90
diff options
context:
space:
mode:
Diffstat (limited to 'captain/api.f90')
-rw-r--r--captain/api.f9012
1 files changed, 9 insertions, 3 deletions
diff --git a/captain/api.f90 b/captain/api.f90
index f75a257..fa72b9d 100644
--- a/captain/api.f90
+++ b/captain/api.f90
@@ -59,7 +59,7 @@ contains
class(request)::req
integer::job_i, task_i
- character(len=:), pointer::status
+ character(len=:), pointer::status, task_type, attribute
status => req%q%get_value("status")
@@ -79,6 +79,13 @@ contains
else if(status == "failed") then
call update_task_status(job_i, task_i, JOB_STATUS_FAILURE)
end if
+
+ task_type => req%q%get_value("type")
+ if(associated(task_type)) then
+ call write_log("Task Type Is "//trim(task_type), LOG_DEBUG)
+ call update_task_type(job_i, task_i, task_type)
+ end if
+
end if
end subroutine handle_task_request
@@ -110,11 +117,10 @@ contains
job_i = req%path_component_int(5)
call write_log("Job "//trim(req%component(5))//" update arrived", LOG_INFO)
- write(player, *) job_i
-
if(.not. is_final_job_status(job_i)) then
if(trim(req%component(6)) == "complete") then
call update_job_status(job_i, JOB_STATUS_SUCCESS)
+
else if(trim(req%component(6)) == "failure") then
call update_job_status(job_i, JOB_STATUS_FAILURE)
end if