def apply(obj: Stage, env: "Env", country: AnyStr, *args, **kwargs): name = get_stage_name(obj) _logger = DummyObject() countries_meta = env.countries_meta if "logger" in countries_meta[country]: _logger, _ = countries_meta[country]["logger"] if not env.is_accepted_stage(stage): _logger.info(f"Stage {name} was not accepted.") return if "status" not in countries_meta[country]: countries_meta[country]["status"] = status.Status() country_status = countries_meta[country]["status"] status_file = os.path.join(env.paths.status_path, status.with_stat_ext(country)) country_status.init(status_file, name) if country_status.need_skip(): _logger.warning(f"Stage {name} was skipped.") return country_status.update_status() method(obj, env, country, *args, **kwargs)
def main_status_path(self) -> AnyStr: return os.path.join(self.status_path, status.with_stat_ext("stages"))