def __init__(self, destiny_object, verbose=False, debug=False): """ Init function for the class Args: destiny_object - A dict containing the destiny section of the fate book verbose - verbosity flag debug - debug flag Returns: None Raise: None """ BaseScheduler.__init__(self, destiny_object) self.verbose = verbose self.debug = debug self.destiny_object = destiny_object # this will contain randomly generated plan for each failure self.plan = [] event_times = [] with open(self.get_constraints()['event_file']) as ev_fd: for event_str in ev_fd.readlines(): event_times.append(long(float(event_str.strip()))) self.generate_plan(event_times)
def __init__(self, destiny_object, verbose=False, debug=False): """ Init function for the class Args: destiny_object - A dict containing the destiny section of the fate book verbose - verbosity flag debug - debug flag Returns: None Raise: None """ BaseScheduler.__init__(self, destiny_object) self.verbose = verbose self.debug = debug self.destiny_object = destiny_object # this will contain randomly generated plan for each failure self.plan = [] self.generate_plan()