elif _signo == signal.SIGUSR2:
            emit(jvm={"ooms": 1.0})
        else:
            # Should not happen
            pass
        m2ee.stop()
        sys.exit(1)

    signal.signal(signal.SIGTERM, sigterm_handler)
    signal.signal(signal.SIGUSR1, sigusr_handler)
    signal.signal(signal.SIGUSR2, sigusr_handler)

    try:
        service_backups()
        set_up_nginx_files(m2ee)
        telegraf.run()
        datadog.run()
        complete_start_procedure_safe_to_use_for_restart(m2ee)
        set_up_instadeploy_if_deploy_password_is_set(m2ee)
        start_metrics(m2ee)
        start_logging_heartbeat()
        start_nginx()
        loop_until_process_dies(m2ee)
    except Exception:
        x = traceback.format_exc()
        logger.error("Starting app container failed: %s" % x)
        callback_url = os.environ.get("BUILD_STATUS_CALLBACK_URL")
        if callback_url:
            requests.put(callback_url, x)
        raise
Beispiel #2
0
                emit(jvm={"errors": 1.0})
            elif _signo == signal.SIGUSR2:
                emit(jvm={"ooms": 1.0})
            else:
                # Should not happen
                pass
            m2ee.stop()
            sys.exit(1)

        signal.signal(signal.SIGTERM, sigterm_handler)
        signal.signal(signal.SIGUSR1, sigusr_handler)
        signal.signal(signal.SIGUSR2, sigusr_handler)

        service_backups()
        set_up_nginx_files(m2ee)
        telegraf.run()
        datadog.run(m2ee.config.get_runtime_version())
        complete_start_procedure_safe_to_use_for_restart(m2ee)
        set_up_instadeploy_if_deploy_password_is_set(m2ee)
        start_metrics(m2ee)
        start_logging_heartbeat()
        start_nginx()
        loop_until_process_dies(m2ee)
    except Exception:
        x = traceback.format_exc()
        logger.error("Starting app container failed: %s" % x)
        callback_url = os.environ.get("BUILD_STATUS_CALLBACK_URL")
        if callback_url:
            requests.put(callback_url, x)
        raise