コード例 #1
0
ファイル: main.py プロジェクト: atulveer/chorus
def main():
    try:
        signal.signal(signal.SIGINT, exit_gracefully)

        if (arg == "setup" and not options.disable_spec) \
           or (arg == "health_check" and (health_args == [] or "checkos" in health_args)):
            system_checking()

        if arg == "health_check":
            handler[arg](" ".join(health_args))
        else:
            handler[arg](options, is_upgrade)
    except Exception as e:
        logger.error(error(str(e) + "\nException Occured, see /tmp/install.log for details" ))
        logger.debug(traceback.format_exc())
        failover(options.chorus_path, options.data_path, is_upgrade)
コード例 #2
0
ファイル: main.py プロジェクト: Chorus/chorus
def main():
    try:
        signal.signal(signal.SIGINT, exit_gracefully)

        if (arg == "setup" and not options.disable_spec) \
           or (arg == "health_check" and (health_args == [] or "checkos" in health_args)):
            system_checking()

        if arg == "health_check":
            handler[arg](" ".join(health_args))
        else:
            handler[arg](options, is_upgrade)
    except Exception as e:
        logger.error(error(str(e) + "\n" + text.get("error_msg", "exception") % log_path))
        logger.debug(traceback.format_exc())
        failover(options.chorus_path, options.data_path, is_upgrade)
        exit(1)
コード例 #3
0
def main():
    try:
        signal.signal(signal.SIGINT, exit_gracefully)

        if (arg == "setup" and not options.disable_spec) \
           or (arg == "health_check" and (health_args == [] or "checkos" in health_args)):
            system_checking()

        if arg == "health_check":
            handler[arg](" ".join(health_args))
        else:
            handler[arg](options, is_upgrade)
    except Exception as e:
        logger.error(
            error(
                str(e) + "\n" + text.get("error_msg", "exception") % log_path))
        logger.debug(traceback.format_exc())
        failover(options.chorus_path, options.data_path, is_upgrade)
        exit(1)
コード例 #4
0
ファイル: main.py プロジェクト: atulveer/chorus
def exit_gracefully(signum, frame):
    #print "\nSetup aborted, Cancelled by user"
    print
    failover(options.chorus_path, options.data_path, is_upgrade)
    sys.exit(1)
コード例 #5
0
def exit_gracefully(signum, frame):
    #print "\nSetup aborted, Cancelled by user"
    print
    failover(options.chorus_path, options.data_path, is_upgrade)
    sys.exit(1)