mirror of
https://github.com/csunny/DB-GPT.git
synced 2025-09-10 21:39:33 +00:00
refactor: Refactor storage and new serve template (#947)
This commit is contained in:
@@ -57,6 +57,12 @@ def db():
|
||||
pass
|
||||
|
||||
|
||||
@click.group()
|
||||
def new():
|
||||
"""New a template"""
|
||||
pass
|
||||
|
||||
|
||||
stop_all_func_list = []
|
||||
|
||||
|
||||
@@ -71,6 +77,7 @@ cli.add_command(start)
|
||||
cli.add_command(stop)
|
||||
cli.add_command(install)
|
||||
cli.add_command(db)
|
||||
cli.add_command(new)
|
||||
add_command_alias(stop_all, name="all", parent_group=stop)
|
||||
|
||||
try:
|
||||
@@ -130,6 +137,13 @@ try:
|
||||
except ImportError as e:
|
||||
logging.warning(f"Integrating dbgpt trace command line tool failed: {e}")
|
||||
|
||||
try:
|
||||
from dbgpt.serve.utils.cli import serve
|
||||
|
||||
add_command_alias(serve, name="serve", parent_group=new)
|
||||
except ImportError as e:
|
||||
logging.warning(f"Integrating dbgpt serve command line tool failed: {e}")
|
||||
|
||||
|
||||
def main():
|
||||
return cli()
|
||||
|
Reference in New Issue
Block a user