Skip to content

Commit

Permalink
feat: bench start --no-prefix (frappe#1040)
Browse files Browse the repository at this point in the history
* bench start --no-prefix option

* help added for --no-prefix option
  • Loading branch information
ABHISHEK-KEDAR-21 committed Aug 3, 2020
1 parent d6a1222 commit 547f2ba
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
5 changes: 3 additions & 2 deletions bench/commands/utils.py
Expand Up @@ -8,11 +8,12 @@

@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")
Expand Down
5 changes: 4 additions & 1 deletion bench/utils.py
Expand Up @@ -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")
Expand All @@ -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)


Expand Down

0 comments on commit 547f2ba

Please sign in to comment.