diff --git a/ews/coordinator/processor_base.py b/ews/coordinator/processor_base.py index d44079c245ce384d3bab2dc3fda1d865e7de9247..fe883ab7615e993c0c50cfe0923fcf6c9e22333d 100755 --- a/ews/coordinator/processor_base.py +++ b/ews/coordinator/processor_base.py @@ -46,8 +46,8 @@ class ProcessorBase: def __init__(self) -> None: super().__init__() time_now = datetime.datetime.today() - self.todayString = time_now.strftime('%Y%m%d') - self.nowString = time_now.strftime('%Y%m%d-%H%M-%S') + self.today_string = time_now.strftime('%Y%m%d') + self.now_string = time_now.strftime('%Y%m%d-%H%M-%S') def parse_and_check_args(self) -> dict: @@ -99,7 +99,7 @@ class ProcessorBase: '-d', '--run-date', metavar = 'YYYYMMDD', action = 'store', - default = self.todayString, + default = self.today_string, help = 'Initial day of calculation, starting at 00 UTC (Default is today)', dest = 'start_date', ) @@ -129,11 +129,11 @@ class ProcessorBase: raise RuntimeError # check the startstring - if args.start_date is not self.todayString: + if args.start_date is not self.today_string: try: # check date string is formatted correctly provided_start_date = datetime.datetime.strptime(args.start_date, '%Y%m%d') - today_date = datetime.datetime.strptime(self.todayString, '%Y%m%d') + today_date = datetime.datetime.strptime(self.today_string, '%Y%m%d') # early limit is quite arbitrary, but this is earliest year of available survey data for Ethiopia date_limit_early = datetime.datetime.strptime('20070101', '%Y%m%d') @@ -198,7 +198,7 @@ class ProcessorBase: :return: """ if os.path.exists(job_path): - archived_dir_path = f"{job_path}-ARCHIVE_{self.nowString}" + archived_dir_path = f"{job_path}-ARCHIVE_{self.now_string}" message = f"Job path {job_path} already exists, so moving it to {archived_dir_path}" print(message) os.rename(job_path, archived_dir_path)