mirror of
https://github.com/mofeng-git/One-KVM.git
synced 2025-12-13 01:30:31 +08:00
setproctitle
This commit is contained in:
parent
3e3fec4d0c
commit
0d19451bbe
@ -17,6 +17,7 @@ depends=(
|
||||
"python-pyudev"
|
||||
"python-raspberry-gpio"
|
||||
"python-pyserial"
|
||||
"python-setproctitle"
|
||||
)
|
||||
makedepends=("python-setuptools")
|
||||
source=("$url/archive/v$pkgver.tar.gz")
|
||||
|
||||
@ -12,6 +12,7 @@ from typing import NamedTuple
|
||||
|
||||
import yaml
|
||||
import serial
|
||||
import setproctitle
|
||||
|
||||
from .logging import get_logger
|
||||
|
||||
@ -130,6 +131,7 @@ class Hid(multiprocessing.Process):
|
||||
get_logger().exception("Can't execute emergency clear HID events")
|
||||
|
||||
def run(self) -> None: # pylint: disable=too-many-branches
|
||||
setproctitle.setproctitle("[hid] " + setproctitle.getproctitle())
|
||||
try:
|
||||
with serial.Serial(self.__device_path, self.__speed) as tty:
|
||||
hid_ready = False
|
||||
|
||||
@ -13,6 +13,7 @@ from typing import Callable
|
||||
from typing import Optional
|
||||
|
||||
import aiohttp.web
|
||||
import setproctitle
|
||||
|
||||
from .aioregion import RegionIsBusyError
|
||||
|
||||
@ -131,6 +132,8 @@ class Server: # pylint: disable=too-many-instance-attributes
|
||||
def run(self, host: str, port: int) -> None:
|
||||
self.__hid.start()
|
||||
|
||||
setproctitle.setproctitle("[main] " + setproctitle.getproctitle())
|
||||
|
||||
app = aiohttp.web.Application(loop=self.__loop)
|
||||
|
||||
app.router.add_get("/info", self.__info_handler)
|
||||
|
||||
@ -4,3 +4,4 @@ aiofiles
|
||||
pyudev
|
||||
pyyaml
|
||||
pyserial
|
||||
setproctitle
|
||||
|
||||
@ -4,5 +4,6 @@ aiofiles
|
||||
pyudev
|
||||
pyyaml
|
||||
pyserial
|
||||
setproctitle
|
||||
bumpversion
|
||||
tox
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user