aboutsummaryrefslogtreecommitdiff
path: root/app/dock_docker.py
diff options
context:
space:
mode:
authorNavan Chauhan <navanchauhan@gmail.com>2020-08-30 16:45:47 +0530
committerNavan Chauhan <navanchauhan@gmail.com>2020-08-30 16:45:47 +0530
commit4815cbde39d6b18d482c33fa22816ecc8e755d37 (patch)
tree777bb20f423d602cfbcaa45435db5754305f3014 /app/dock_docker.py
parente64830992db27939840bc68364de3f47441c154f (diff)
stores a local copy in the reports folder
Diffstat (limited to 'app/dock_docker.py')
-rw-r--r--app/dock_docker.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/app/dock_docker.py b/app/dock_docker.py
index 34cb809..1c60a3b 100644
--- a/app/dock_docker.py
+++ b/app/dock_docker.py
@@ -67,12 +67,13 @@ if r[9] is not None:
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)
print(f)
import tempfile
-from shutil import make_archive
+from shutil import make_archive, copyfile
with tempfile.TemporaryDirectory() as directory:
print('The created temporary directory is %s' % directory)
@@ -92,6 +93,7 @@ with tempfile.TemporaryDirectory() as directory:
zi = os.path.join(f,z)
make_archive(zi, 'zip', directory)
#copy(("Curie_Web_Result_"+str(jobID)),f)
+ copyfile("report.pdf",os.path.join(reportDirectory,(str(jobID)+".pdf")))
email(zi)
#print((str(zi) + ".zip"))
mycursor.execute('UPDATE curieweb set done=1 where id="%s"' % (jobID))