diff --git a/bench/commands/utils.py b/bench/commands/utils.py index 9e829887..87cb15b3 100644 --- a/bench/commands/utils.py +++ b/bench/commands/utils.py @@ -5,10 +5,11 @@ import sys, os, copy @click.command('start') @click.option('--no-dev', is_flag=True, default=False) @click.option('--concurrency', '-c', type=str) -def start(no_dev, concurrency): +@click.option('--procfile', '-p', type=str) +def start(no_dev, concurrency, procfile): "Start Frappe development processes" from bench.utils import start - start(no_dev=no_dev, concurrency=concurrency) + start(no_dev=no_dev, concurrency=concurrency, procfile=procfile) @click.command('restart') diff --git a/bench/utils.py b/bench/utils.py index c0fd88df..84f98909 100755 --- a/bench/utils.py +++ b/bench/utils.py @@ -317,7 +317,7 @@ def get_program(programs): def get_process_manager(): return get_program(['foreman', 'forego', 'honcho']) -def start(no_dev=False, concurrency=None): +def start(no_dev=False, concurrency=None, procfile=None): program = get_process_manager() if not program: raise Exception("No process manager found") @@ -329,6 +329,9 @@ def start(no_dev=False, concurrency=None): if concurrency: command.extend(['-c', concurrency]) + if procfile: + command.extend(['-f', procfile]) + os.execv(program, command) def check_cmd(cmd, cwd='.'):