Skip to content

Commit

Permalink
Merge pull request #396 from linien-org/feature/cli-performance
Browse files Browse the repository at this point in the history
Improve server CLI performance
  • Loading branch information
bleykauf authored May 14, 2024
2 parents 32b0f35 + 9bb4fbe commit 1881c8a
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 10 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Fixed
* Improved performance of server CLI by @bleykauf in https://github.com/linien-org/linien/pull/396

## [2.0.1] - 2024-05-13

Expand Down
23 changes: 13 additions & 10 deletions linien-server/linien_server/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,6 @@
from typing import Optional

import fire
from linien_common.communication import (
no_authenticator,
username_and_password_authenticator,
)
from linien_server import __version__, mdio_tool
from linien_server.server import (
FakeRedPitayaControlService,
RedPitayaControlService,
run_threaded_server,
)

logger = logging.getLogger(__name__)
logger.setLevel(logging.DEBUG)
Expand All @@ -49,6 +39,8 @@ def copy_systemd_service_file() -> None:
class LinienServerCLI:
def version(self) -> str:
"""Return the version of the Linien server."""
from linien_server import __version__

return __version__

def start(self) -> None:
Expand Down Expand Up @@ -76,6 +68,17 @@ def run(self, fake: bool = False, host: Optional[str] = None) -> None:
fake: Whether to run a fake server.
host: The hostname of the Red Pitaya.
"""
from linien_common.communication import (
no_authenticator,
username_and_password_authenticator,
)
from linien_server import mdio_tool
from linien_server.server import (
FakeRedPitayaControlService,
RedPitayaControlService,
run_threaded_server,
)

if fake:
control = FakeRedPitayaControlService()
else:
Expand Down

0 comments on commit 1881c8a

Please sign in to comment.