2
0
mirror of https://github.com/frappe/bench.git synced 2024-11-12 00:06:36 +00:00

feat: bench start --no-prefix (#1040)

* bench start --no-prefix option

* help added for --no-prefix option
This commit is contained in:
ABHISHEK KEDAR 2020-08-03 17:48:00 +05:30 committed by GitHub
parent d6a12221da
commit 547f2bae82
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 3 deletions

View File

@ -8,11 +8,12 @@ import click
@click.command('start', help="Start Frappe development processes")
@click.option('--no-dev', is_flag=True, default=False)
@click.option('--no-prefix', is_flag=True, default=False, help="Hide process name from bench start log")
@click.option('--concurrency', '-c', type=str)
@click.option('--procfile', '-p', type=str)
def start(no_dev, concurrency, procfile):
def start(no_dev, concurrency, procfile, no_prefix):
from bench.utils import start
start(no_dev=no_dev, concurrency=concurrency, procfile=procfile)
start(no_dev=no_dev, concurrency=concurrency, procfile=procfile, no_prefix=no_prefix)
@click.command('restart', help="Restart supervisor processes or systemd units")

View File

@ -461,7 +461,7 @@ def get_process_manager():
return proc_man_path
def start(no_dev=False, concurrency=None, procfile=None):
def start(no_dev=False, concurrency=None, procfile=None, no_prefix=False):
program = get_process_manager()
if not program:
raise Exception("No process manager found")
@ -476,6 +476,9 @@ def start(no_dev=False, concurrency=None, procfile=None):
if procfile:
command.extend(['-f', procfile])
if no_prefix:
command.extend(['--no-prefix'])
os.execv(program, command)