diff options
author | Jeffrey Armstrong <jeff@approximatrix.com> | 2021-06-22 17:04:59 -0400 |
---|---|---|
committer | Jeffrey Armstrong <jeff@approximatrix.com> | 2021-06-22 17:04:59 -0400 |
commit | d6f9ce81e4fd27c94cf656699ef4952956dff608 (patch) | |
tree | e3d3abab4b22b271b0886dc49830691f9f3f4c3e /captain/api.f90 | |
parent | 660235928d1dd57d85cb7bd986c5036783a6073f (diff) | |
download | levitating-d6f9ce81e4fd27c94cf656699ef4952956dff608.tar.gz levitating-d6f9ce81e4fd27c94cf656699ef4952956dff608.zip |
Added new database table for tracking last player checkin with requisite Fortran procedures.
Diffstat (limited to 'captain/api.f90')
-rw-r--r-- | captain/api.f90 | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/captain/api.f90 b/captain/api.f90 index 2f0a746..4d9545e 100644 --- a/captain/api.f90 +++ b/captain/api.f90 @@ -84,15 +84,17 @@ contains use captain_db use special_filenames use logging + use query_utilities implicit none type(request), intent(in)::req type(response)::resp character(PLAYER_NAME_LENGTH)::player, instruction - integer::job_i, player_i + integer::job_i, player_i, qs_platform_index character(len=:), pointer::checkin_work_json + type(query)::q ! Complete - "/api/player/{name}/job/{jobid}/complete" ! Failed - "/api/player/{name}/job/{jobid}/failed" @@ -130,6 +132,19 @@ contains ! the jobs as failed. call mark_working_jobs_as_failed(player_i) + ! Acknowledge the checkin in the database + if(associated(req%query_string)) then + call q%init(req%query_string) + if(associated(q%get_value("platform"))) then + call acknowledge_checkin(player_i, q%get_value("platform")) + else + call acknowledge_checkin(player_i) + end if + call q%destroy() + else + call acknowledge_checkin(player_i) + end if + job_i = get_pending_job_for_player(player_i) if(job_i < 0) then resp%code = GEMINI_CODE_SUCCESS |