Skip to content
Merged
Show file tree
Hide file tree
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
14 changes: 14 additions & 0 deletions openviking/server/bootstrap.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,26 @@
from openviking_cli.utils.logger import configure_uvicorn_logging


def _get_version() -> str:
try:
from openviking import __version__

return __version__
except ImportError:
return "unknown"


def main():
"""Main entry point for openviking-server command."""
parser = argparse.ArgumentParser(
description="OpenViking HTTP Server",
formatter_class=argparse.ArgumentDefaultsHelpFormatter,
)
parser.add_argument(
"--version",
action="version",
version=f"openviking-server {_get_version()}",
)
parser.add_argument(
"--host",
type=str,
Expand Down
2 changes: 1 addition & 1 deletion openviking/service/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ def _init_storage(
from openviking.utils.agfs_utils import create_agfs_client

mode = getattr(config.agfs, "mode", "http-client")
if mode == "http-client" and config.agfs.backend == "local":
if mode == "http-client":
self._agfs_manager = AGFSManager(config=config.agfs)
self._agfs_manager.start()
self._agfs_url = self._agfs_manager.url
Expand Down
Loading