diff options
author | Navan Chauhan <navanchauhan@gmail.com> | 2020-08-30 16:45:47 +0530 |
---|---|---|
committer | Navan Chauhan <navanchauhan@gmail.com> | 2020-08-30 16:45:47 +0530 |
commit | 4815cbde39d6b18d482c33fa22816ecc8e755d37 (patch) | |
tree | 777bb20f423d602cfbcaa45435db5754305f3014 /app/dock-single.py | |
parent | e64830992db27939840bc68364de3f47441c154f (diff) |
stores a local copy in the reports folder
Diffstat (limited to 'app/dock-single.py')
-rw-r--r-- | app/dock-single.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/app/dock-single.py b/app/dock-single.py index be623f7..af6c4c4 100644 --- a/app/dock-single.py +++ b/app/dock-single.py @@ -202,11 +202,12 @@ date = records[6] import os cd = os.getcwd() f = os.path.join(cd,"static/uploads") +reportDirectory = os.path.join(f,"reports") #t = os.path.join(f,"receptor",target) #r = os.path.join(f,"ligands",ligand) #c = os.path.join(f,"configs",config) import tempfile -from shutil import make_archive +from shutil import make_archive, copyfile import time with tempfile.TemporaryDirectory() as directory: @@ -228,6 +229,7 @@ with tempfile.TemporaryDirectory() as directory: z = "Curie_Web_Result_"+str(jobID) zi = os.path.join(f,z) make_archive(zi, 'zip', directory) + copyfile("report.pdf",os.path.join(reportDirectory,(str(jobID)+".pdf"))) #copy(("Curie_Web_Result_"+str(jobID)),f) email(zi) #print((str(zi) + ".zip")) |