mirror of
https://github.com/tiqi-group/pydase.git
synced 2025-06-06 13:30:41 +02:00
Merge pull request #216 from tiqi-group/config/changing_loading_behaviour
feat (config): changes web_port loading
This commit is contained in:
commit
b0dd5835a3
@ -87,8 +87,10 @@ class Server:
|
||||
service: The DataService instance that this server will manage.
|
||||
host: The host address for the server. Defaults to `'0.0.0.0'`, which means all
|
||||
available network interfaces.
|
||||
web_port: The port number for the web server. Defaults to
|
||||
[`ServiceConfig().web_port`][pydase.config.ServiceConfig.web_port].
|
||||
web_port: The port number for the web server. If set to None, it will use the
|
||||
port defined in
|
||||
[`ServiceConfig().web_port`][pydase.config.ServiceConfig.web_port]. Defaults
|
||||
to None.
|
||||
enable_web: Whether to enable the web server.
|
||||
filename: Filename of the file managing the service state persistence.
|
||||
additional_servers: A list of additional servers to run alongside the main
|
||||
@ -140,7 +142,7 @@ class Server:
|
||||
self,
|
||||
service: DataService,
|
||||
host: str = "0.0.0.0",
|
||||
web_port: int = ServiceConfig().web_port,
|
||||
web_port: int | None = None,
|
||||
enable_web: bool = True,
|
||||
filename: str | Path | None = None,
|
||||
additional_servers: list[AdditionalServer] | None = None,
|
||||
@ -151,6 +153,9 @@ class Server:
|
||||
additional_servers = []
|
||||
self._service = service
|
||||
self._host = host
|
||||
if web_port is None:
|
||||
self._web_port = ServiceConfig().web_port
|
||||
else:
|
||||
self._web_port = web_port
|
||||
self._enable_web = enable_web
|
||||
self._kwargs = kwargs
|
||||
|
Loading…
x
Reference in New Issue
Block a user