From 79c12f1f741e6391d0405351c55ce2148db32703 Mon Sep 17 00:00:00 2001 From: dbeltran Date: Wed, 14 Apr 2021 12:38:44 +0200 Subject: [PATCH 1/2] sleep added --- autosubmit/job/job.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/autosubmit/job/job.py b/autosubmit/job/job.py index 8e51ac58b..394522214 100644 --- a/autosubmit/job/job.py +++ b/autosubmit/job/job.py @@ -938,10 +938,18 @@ class Job(object): if as_conf.get_project_type().lower() != "none": template_file = open(os.path.join( as_conf.get_project_dir(), self.file), 'r') - template = template_file.read() + if self.type == Type.BASH: + template = 'sleep 30' + elif self.type == Type.PYTHON: + template = 'time.sleep(30)' + elif self.type == Type.R: + template = 'Sys.sleep(30)' + else: + template = '' + template += template_file.read() else: if self.type == Type.BASH: - template = 'sleep 120' + template = 'sleep 5' elif self.type == Type.PYTHON: template = 'time.sleep(5)' elif self.type == Type.R: -- GitLab From b7c6b1e38b91c4cc850ea5b5f37f8135e7d42616 Mon Sep 17 00:00:00 2001 From: dbeltran Date: Fri, 16 Apr 2021 14:44:00 +0200 Subject: [PATCH 2/2] Presubmission changes ( sleep was triggered for all jobs instead of only if hold directive is present) --- autosubmit/job/job.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/autosubmit/job/job.py b/autosubmit/job/job.py index 394522214..e2ddb23cc 100644 --- a/autosubmit/job/job.py +++ b/autosubmit/job/job.py @@ -938,14 +938,14 @@ class Job(object): if as_conf.get_project_type().lower() != "none": template_file = open(os.path.join( as_conf.get_project_dir(), self.file), 'r') - if self.type == Type.BASH: - template = 'sleep 30' - elif self.type == Type.PYTHON: - template = 'time.sleep(30)' - elif self.type == Type.R: - template = 'Sys.sleep(30)' - else: - template = '' + template = '' + if as_conf.get_remote_dependencies(): + if self.type == Type.BASH: + template = 'sleep 30' +"\n" + elif self.type == Type.PYTHON: + template = 'time.sleep(30)' +"\n" + elif self.type == Type.R: + template = 'Sys.sleep(30)' +"\n" template += template_file.read() else: if self.type == Type.BASH: -- GitLab