示例#1
0
def model_creator(event, dataset_name, log_lvl_number):
    try:
        mc = ModelCreator(MODEL_CREATOR_IN_ADDR_DICT,
                          event_filename=dataset_name + ".csv",
                          event_types_filename=dataset_name + ".json",
                          log_lvl=log_lvl_number)
        event.set()
        mc.start()
    except KeyboardInterrupt:
        mc.close()
示例#2
0
def model_creator(stream, event, event_close, dataset_name, log_lvl_number):
    signal.signal(signal.SIGINT, signal.SIG_IGN)
    try:
        mc = ModelCreator(stream,
                          event_close,
                          sending_events=False,
                          event_filename=dataset_name + ".csv",
                          event_types_filename=dataset_name + ".json",
                          log_lvl=log_lvl_number)
        event.set()
        mc.start()
    except Exception as e:
        print("[ERROR] Unhandled exception in Profiler model creator module: {}".format(e))