def main(): sys.stdout = lib.Logger(logging.info) sys.stderr = lib.Logger(logging.warning) run_fim_scan = FIM_scan() run_fim_scan.run()
import jira import lib import sys import logging sys.stdout = lib.Logger(logging.info) sys.stderr = lib.Logger(logging.warning) # Build config config = lib.ConfigHelper() # Halo events events = lib.HaloEvents(config) # Matcher object matcher = lib.Matcher(config.match_list) jira = jira.JiraController(config.jira) # Iterate over events, quarantine targeted workloads while True: for event in events: if matcher.is_a_match(event["type"]): exist, summary = jira.check_ticket_existence(event) if event["type"] == "issue_resolved" and exist: jira.transition_ticket(summary) elif event["type"] != "issue_resolved" and not exist: jira.create_ticket(event, summary)
def main(): sys.stdout = lib.Logger(logging.info) sys.stderr = lib.Logger(logging.warning) halo_arf = AutoRestoreFw() halo_arf.run()
help="Maximum length of predictions.") # Others parser.add_argument("-eps", type=float, default=0.75, help="tolerance in entropy constraint") parser.add_argument("-mu", type=float, default=0.8, help="threshold for a phrase to be stored in Buffer") opt = parser.parse_args() # Setup a logger here for logging the training process trpro_logger = lib.Logger() if opt.eval: save_file = 'evalInfo.txt' stat_logger = None samples_logger = None else: # training mode save_file = 'trainInfo.txt' if opt.use_bipnmt: stat_logger = lib.Logger() stat_logger.set_log_file(os.path.join(opt.save_dir, "stat.txt")) samples_logger = lib.Logger() samples_logger.set_log_file(os.path.join(opt.save_dir, "samples.txt")) else: stat_logger = None samples_logger = None