diff options
author | Jeffrey Armstrong <jeff@approximatrix.com> | 2022-06-29 08:33:07 -0400 |
---|---|---|
committer | Jeffrey Armstrong <jeff@approximatrix.com> | 2022-06-29 08:33:07 -0400 |
commit | fb7136be64188cab7db34ac3ad6c8f27098173de (patch) | |
tree | 8660bbd7aec6a256dcaf672d5ffc4ac9c2d96fc4 /captain/special.f90 | |
parent | 6e59e791b7b4d1184e70378544b6ace433ab33aa (diff) | |
download | levitating-fb7136be64188cab7db34ac3ad6c8f27098173de.tar.gz levitating-fb7136be64188cab7db34ac3ad6c8f27098173de.zip |
Initial work to show artifacts on job pages.
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 |