How to use the honcho.environ.parse_procfile function in honcho

To help you get started, we’ve selected a few honcho examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github nickstenning / honcho / tests / View on Github external
def test_parse_procfile(content, processes):
    content = textwrap.dedent(content)
    p = environ.parse_procfile(content)
    assert p.processes == processes
github nickstenning / honcho / tests / View on Github external
def test_parse_procfile_ordered():
    content = textwrap.dedent("""
    one: onecommand
    two: twocommand
    three: twocommand
    four: fourcommand

    p = environ.parse_procfile(content)
    order = [k for k in p.processes]
    assert order == ['one', 'two', 'three', 'four']
github frascoweb / frasco / frasco / cli / View on Github external
def run_command(info, host, port, procfile, process):
    processes = None
    if procfile:
        for filename in ["Procfile.%s" % info.env, "Procfile"]:
            if os.path.exists(filename):
                click.echo("Using %s" % filename)
                with open(filename) as f:
                    content =
                processes = honcho.environ.parse_procfile(content).processes

    if not processes:
        processes = get_app_processes(info)

    if process:
        if process not in processes:
            click.echo('Unknown process %s' % process)
        click.echo('Only running process %s' % process)
        processes = dict([(process, processes[process])])

    start_honcho(processes, {"HOST": host, "PORT": port})
github nickstenning / honcho / honcho / View on Github external
def _procfile(filename):
        with open(filename) as f:
            content =
    except IOError:
        raise CommandError('Procfile does not exist or is not a file')

        procfile = environ.parse_procfile(content)
    except AssertionError as e:
        raise CommandError(str(e))

    return procfile