From 5f3327b029f7239a16263ea45845af7fd589cb79 Mon Sep 17 00:00:00 2001 From: Wilmer Uruchi Ticona Date: Mon, 26 Apr 2021 13:10:41 +0200 Subject: [PATCH] In relation to #676: Removed the warning level switch because it was too intrusive. Implemented a small fix to the qos value saved in the historical database. --- autosubmit/config/config_common.py | 4 ---- autosubmit/job/job.py | 11 ++++++----- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/autosubmit/config/config_common.py b/autosubmit/config/config_common.py index 1e1751f84..03947174b 100644 --- a/autosubmit/config/config_common.py +++ b/autosubmit/config/config_common.py @@ -1580,8 +1580,6 @@ class AutosubmitConfig(object): """ parser = parser_factory.create_parser() parser.optionxform = str - # Activating warnings - Log.set_console_level('WARNING') # For testing purposes if file_path.find('/dummy/local/root/dir/a000/conf/') >= 0 or file_path.find('dummy/file/path') >= 0: parser.read(file_path) @@ -1601,7 +1599,5 @@ class AutosubmitConfig(object): except Exception as exp: raise Exception( "{}\n This file and the correctness of its content are necessary.".format(str(exp))) - # Back to info level - Log.set_console_level('INFO') # parser.read(file_path) return parser diff --git a/autosubmit/job/job.py b/autosubmit/job/job.py index b4b34af03..78346b27f 100644 --- a/autosubmit/job/job.py +++ b/autosubmit/job/job.py @@ -948,11 +948,11 @@ class Job(object): template = '' if as_conf.get_remote_dependencies(): if self.type == Type.BASH: - template = 'sleep 30' +"\n" + template = 'sleep 30' + "\n" elif self.type == Type.PYTHON: - template = 'time.sleep(30)' +"\n" + template = 'time.sleep(30)' + "\n" elif self.type == Type.R: - template = 'Sys.sleep(30)' +"\n" + template = 'Sys.sleep(30)' + "\n" template += template_file.read() else: if self.type == Type.BASH: @@ -1119,7 +1119,7 @@ class Job(object): f.write(date2str(datetime.datetime.now(), 'S')) # Writing database JobDataStructure(self.expid).write_submit_time(self.name, time.time(), Status.VALUE_TO_KEY[self.status] if self.status in Status.VALUE_TO_KEY.keys() else "UNKNOWN", self.processors, - self.wallclock, self._queue, self.date, self.member, self.section, self.chunk, self.platform_name, self.id, self.packed) + self.wallclock, self.queue, self.date, self.member, self.section, self.chunk, self.platform_name, self.id, self.packed) def write_start_time(self): """ @@ -1533,7 +1533,8 @@ class WrapperJob(Job): retries = retries - 1 if output is not None and output != '' and 'COMPLETED' in output: job.new_status = Status.COMPLETED - job.update_status(self.as_config.get_copy_remote_logs() == 'true',failed_file) + job.update_status(self.as_config.get_copy_remote_logs() + == 'true', failed_file) self.running_jobs_start.pop(job, None) def update_failed_jobs(self, canceled_wrapper=False): -- GitLab