diff options
author | Jeffrey Armstrong <jeff@approximatrix.com> | 2022-06-29 08:40:04 -0400 |
---|---|---|
committer | Jeffrey Armstrong <jeff@approximatrix.com> | 2022-06-29 08:40:04 -0400 |
commit | 10247d7db2aaffdc617066fa261de8df6454e966 (patch) | |
tree | a5a17fde9904b27e57fa51357cbd8ae1cfe0f8d9 /captain/special.f90 | |
parent | 6f681035a7c7125a72ce04d6881c1579bdb96d09 (diff) | |
parent | fb7136be64188cab7db34ac3ad6c8f27098173de (diff) | |
download | levitating-10247d7db2aaffdc617066fa261de8df6454e966.tar.gz levitating-10247d7db2aaffdc617066fa261de8df6454e966.zip |
Merge branch 'artifacts'
Diffstat (limited to 'captain/special.f90')
-rw-r--r-- | captain/special.f90 | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/captain/special.f90 b/captain/special.f90 index 553378e..4d8640f 100644 --- a/captain/special.f90 +++ b/captain/special.f90 @@ -129,4 +129,38 @@ contains end function get_full_filename_from_request + subroutine report_upload(req) + use captain_db + use server_response + use logging + implicit none + + class(request), intent(in)::req + integer::job_id, ierr + character(len=:), pointer:: job_text + + character(256)::first + character(1024)::remaining + integer::i + + job_text => req%q%get_value("job") + call write_log("jobtext: "//trim(job_text)) + if(associated(job_text)) then + read(job_text, *, iostat=ierr) job_id + if(ierr == 0) then + call write_log("jobid ok") + call req%path_component(1, first) + i = index(req%location, trim(first)) + i = i + len_trim(first) + 1 + remaining = req%location(i:len_trim(req%location)) + + + call write_log("Writing job upload for: "//trim(first)//" -> "//trim(remaining)) + call add_job_upload_db(job_id, trim(first), trim(remaining)) + + end if + end if + + end subroutine report_upload + end module special_filenames |