def get_websites_to_notify(self): """This gets websites from the segment that WikiApiary is in.""" curr_day = 4 curr_hour = 18 task = NotifySegment() sites = task.get_notify_sites(curr_day, curr_hour) if 'WikiApiary' not in sites: raise Exception('WikiApiary not in list of sites returned.')
def run_notify_segment(): """Send notifications each hour.""" LOGGER.info("Starting notifications") task = NotifySegment() task.run()