Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 13 additions & 3 deletions python/cocoindex/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -408,6 +408,12 @@ def update(
app_ref, flow_name = _parse_app_flow_specifier(app_flow_specifier)
_load_user_app(app_ref)

if live:
click.secho(
"NOTE: Flow code changes will NOT be reflected in the server until you restart it.",
fg="red",
)

options = flow.FlowLiveUpdaterOptions(live_mode=live, print_stats=not quiet)
if flow_name is None:
if setup:
Expand Down Expand Up @@ -597,6 +603,10 @@ def server(
),
)
else:
click.secho(
"NOTE: Flow code changes will NOT be reflected in the server until you restart it. Use --reload to enable auto-reload.",
fg="red",
)
_run_server(*args)


Expand Down Expand Up @@ -633,9 +643,6 @@ def _run_server(
if address is not None:
server_settings.address = address

if COCOINDEX_HOST in cors_origins:
click.echo(f"Open CocoInsight at: {COCOINDEX_HOST}/cocoinsight")

if run_setup:
_setup_flows(
flow.flows().values(),
Expand All @@ -649,6 +656,9 @@ def _run_server(

lib.start_server(server_settings)

if COCOINDEX_HOST in cors_origins:
click.echo(f"Open CocoInsight at: {COCOINDEX_HOST}/cocoinsight")

click.secho("Press Ctrl+C to stop the server.", fg="yellow")

shutdown_event = threading.Event()
Expand Down