mirror of
https://github.com/mofeng-git/One-KVM.git
synced 2026-02-01 18:41:54 +08:00
global event loop
This commit is contained in:
@@ -20,8 +20,6 @@
|
||||
# ========================================================================== #
|
||||
|
||||
|
||||
import asyncio
|
||||
|
||||
from typing import List
|
||||
from typing import Optional
|
||||
|
||||
@@ -46,7 +44,6 @@ def main(argv: Optional[List[str]]=None) -> None:
|
||||
config = init("kvmd", description="The main Pi-KVM daemon", argv=argv)[2].kvmd
|
||||
with gpio.bcm():
|
||||
# pylint: disable=protected-access
|
||||
loop = asyncio.get_event_loop()
|
||||
Server(
|
||||
auth_manager=AuthManager(
|
||||
internal_users=config.auth.internal_users,
|
||||
@@ -55,14 +52,12 @@ def main(argv: Optional[List[str]]=None) -> None:
|
||||
internal=config.auth.internal._unpack(),
|
||||
external=(config.auth.external._unpack() if config.auth.external_type else {}),
|
||||
),
|
||||
info_manager=InfoManager(loop=loop, **config.info._unpack()),
|
||||
log_reader=LogReader(loop=loop),
|
||||
info_manager=InfoManager(**config.info._unpack()),
|
||||
log_reader=LogReader(),
|
||||
|
||||
hid=Hid(**config.hid._unpack()),
|
||||
atx=Atx(**config.atx._unpack()),
|
||||
msd=MassStorageDevice(loop=loop, **config.msd._unpack()),
|
||||
streamer=Streamer(loop=loop, **config.streamer._unpack()),
|
||||
|
||||
loop=loop,
|
||||
msd=MassStorageDevice(**config.msd._unpack()),
|
||||
streamer=Streamer(**config.streamer._unpack()),
|
||||
).run(**config.server._unpack())
|
||||
get_logger().info("Bye-bye")
|
||||
|
||||
Reference in New Issue
Block a user