Skip to content
Snippets Groups Projects
Commit 04d1c01e authored by Danial Hezarkhani's avatar Danial Hezarkhani
Browse files

bugfix for tmp folder

parent 03bfded0
No related branches found
No related tags found
No related merge requests found
...@@ -37,6 +37,7 @@ def start_job(unicore_config): ...@@ -37,6 +37,7 @@ def start_job(unicore_config):
pull_job = UnicoreJob(unicore_config["username"],unicore_config["password"], unicore_config["site"]) pull_job = UnicoreJob(unicore_config["username"],unicore_config["password"], unicore_config["site"])
pull_job_desc = pull_job.generate_pull_config(unicore_config) pull_job_desc = pull_job.generate_pull_config(unicore_config)
pull_job.submit_job(pull_job_desc) pull_job.submit_job(pull_job_desc)
pull_job.wait_job_started()
logger.info("In the meanwhile. check the logs under the path {}/{}".format(unicore_path, pull_job.get_job_name())) logger.info("In the meanwhile. check the logs under the path {}/{}".format(unicore_path, pull_job.get_job_name()))
pull_job.wait_job_finished() pull_job.wait_job_finished()
......
...@@ -36,7 +36,7 @@ class UnicoreJob: ...@@ -36,7 +36,7 @@ class UnicoreJob:
print(json.dumps(self.job.properties, indent = 2)) print(json.dumps(self.job.properties, indent = 2))
def wait_job_started(self): def wait_job_started(self):
logger.info("Waiting for the job to start...") logger.info("Job submited. Waiting for the job to start.")
self.job.poll(uc_client.JobStatus.RUNNING) self.job.poll(uc_client.JobStatus.RUNNING)
return True return True
...@@ -91,8 +91,8 @@ class UnicoreJob: ...@@ -91,8 +91,8 @@ class UnicoreJob:
"JOBDIR=job1", "JOBDIR=job1",
"WRITABLE_DIRECTORY=/tmp/cacheapptainer/${JOBDIR}Cache", "export WRITABLE_DIRECTORY=/tmp/cacheapptainer/${JOBDIR}Cache",
"APPTAINER_FOLDER=${}/apptainerfolder".format(scratch_folder_name), "export APPTAINER_FOLDER={}/apptainerfolder".format(scratch_folder_name),
"mkdir -p ${WRITABLE_DIRECTORY}", "mkdir -p ${WRITABLE_DIRECTORY}",
"mkdir -p ${APPTAINER_FOLDER}", "mkdir -p ${APPTAINER_FOLDER}",
...@@ -179,7 +179,7 @@ class UnicoreJob: ...@@ -179,7 +179,7 @@ class UnicoreJob:
scratch_folder_name = "${{SCRATCH_{}}}".format(project) scratch_folder_name = "${{SCRATCH_{}}}".format(project)
data_beginn = [ data_beginn = [
"#!/bin/sh", "#!/bin/sh",
"APPTAINER_FOLDER=${}/apptainerfolder".format(scratch_folder_name), "APPTAINER_FOLDER={}/apptainerfolder".format(scratch_folder_name),
] ]
data_end = [ data_end = [
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment