示例#1
0
def start_stepfunctions(port=None, asynchronous=False, update_listener=None):
    port = port or config.PORT_STEPFUNCTIONS
    backend_port = config.LOCAL_PORT_STEPFUNCTIONS
    install.install_stepfunctions_local()
    cmd = get_command(backend_port)
    log_startup_message("StepFunctions")
    start_proxy_for_service("stepfunctions", port, backend_port,
                            update_listener)
    return do_run(cmd, asynchronous)
示例#2
0
def start_stepfunctions(port=None, asynchronous=False, update_listener=None):
    port = port or config.PORT_STEPFUNCTIONS
    install.install_stepfunctions_local()
    # TODO: local port is currently hard coded in Step Functions Local :/
    backend_port = 8083
    cmd = get_command()
    print('Starting mock StepFunctions service on %s port %s...' % (get_service_protocol(), config.EDGE_PORT))
    start_proxy_for_service('stepfunctions', port, backend_port, update_listener)
    return do_run(cmd, asynchronous)
示例#3
0
def start_stepfunctions(port=None, asynchronous=False, update_listener=None):
    port = port or config.PORT_STEPFUNCTIONS
    backend_port = config.LOCAL_PORT_STEPFUNCTIONS
    install.install_stepfunctions_local()
    cmd = get_command(backend_port)
    print('Starting mock StepFunctions service on %s ...' % edge_ports_info())
    start_proxy_for_service('stepfunctions', port, backend_port,
                            update_listener)
    return do_run(cmd, asynchronous)
def start_stepfunctions(port=PORT_STEPFUNCTIONS, asynchronous=False, update_listener=None):
    install.install_stepfunctions_local()
    backend_port = DEFAULT_PORT_STEPFUNCTIONS_BACKEND
    # TODO: local port is currently hard coded in Step Functions Local :/
    backend_port = 8083
    lambda_endpoint = aws_stack.get_local_service_url('lambda')
    dynamodb_endpoint = aws_stack.get_local_service_url('dynamodb')
    sns_endpoint = aws_stack.get_local_service_url('sns')
    sqs_endpoint = aws_stack.get_local_service_url('sqs')
    cmd = ('cd %s; java -Dcom.amazonaws.sdk.disableCertChecking -jar StepFunctionsLocal.jar '
           '--lambda-endpoint %s --dynamodb-endpoint %s --sns-endpoint %s '
           '--sqs-endpoint %s --aws-region %s --aws-account %s') % (
        install.INSTALL_DIR_STEPFUNCTIONS, lambda_endpoint, dynamodb_endpoint,
        sns_endpoint, sqs_endpoint, DEFAULT_REGION, TEST_AWS_ACCOUNT_ID)
    print('Starting mock StepFunctions (%s port %s)...' % (get_service_protocol(), port))
    start_proxy_for_service('stepfunctions', port, backend_port, update_listener)
    return do_run(cmd, asynchronous)
def start_stepfunctions(asynchronous=True):
    # TODO: introduce Server abstraction for StepFunctions process
    global PROCESS_THREAD
    backend_port = config.LOCAL_PORT_STEPFUNCTIONS
    install.install_stepfunctions_local()
    cmd = get_command(backend_port)
    log_startup_message("StepFunctions")
    # TODO: change ports in stepfunctions.jar, then update here
    PROCESS_THREAD = do_run(
        cmd,
        asynchronous,
        strip_color=True,
        env_vars={
            "EDGE_PORT": config.EDGE_PORT_HTTP or config.EDGE_PORT,
            "EDGE_PORT_HTTP": config.EDGE_PORT_HTTP or config.EDGE_PORT,
            "DATA_DIR": config.DATA_DIR,
        },
    )
    return PROCESS_THREAD
示例#6
0
def start_stepfunctions(port=None, asynchronous=False, update_listener=None):
    port = port or config.service_port("stepfunctions")
    backend_port = config.LOCAL_PORT_STEPFUNCTIONS
    install.install_stepfunctions_local()
    cmd = get_command(backend_port)
    log_startup_message("StepFunctions")
    start_proxy_for_service("stepfunctions", port, backend_port,
                            update_listener)
    global PROCESS_THREAD
    # TODO: change ports in stepfunctions.jar, then update here
    PROCESS_THREAD = do_run(
        cmd,
        asynchronous,
        strip_color=True,
        env_vars={
            "EDGE_PORT": config.EDGE_PORT_HTTP or config.EDGE_PORT,
            "EDGE_PORT_HTTP": config.EDGE_PORT_HTTP or config.EDGE_PORT,
            "DATA_DIR": config.DATA_DIR,
        },
    )
    return PROCESS_THREAD