Put BAPSicle in process names for htop filtering.
This commit is contained in:
parent
81d986069f
commit
aba31048cc
9 changed files with 9 additions and 9 deletions
|
@ -21,7 +21,7 @@ class MattchBox(Controller):
|
||||||
self, player_to_q: List[Queue], player_from_q: Queue, state: StateManager
|
self, player_to_q: List[Queue], player_from_q: Queue, state: StateManager
|
||||||
):
|
):
|
||||||
|
|
||||||
process_title = "ControllerHandler"
|
process_title = "BAPSicle - ControllerHandler"
|
||||||
setproctitle(process_title)
|
setproctitle(process_title)
|
||||||
current_process().name = process_title
|
current_process().name = process_title
|
||||||
|
|
||||||
|
|
|
@ -23,7 +23,7 @@ class FileManager:
|
||||||
self.logger = LoggingManager("FileManager")
|
self.logger = LoggingManager("FileManager")
|
||||||
self.api = MyRadioAPI(self.logger, server_config)
|
self.api = MyRadioAPI(self.logger, server_config)
|
||||||
|
|
||||||
process_title = "File Manager"
|
process_title = "BAPSicle - File Manager"
|
||||||
setproctitle(process_title)
|
setproctitle(process_title)
|
||||||
current_process().name = process_title
|
current_process().name = process_title
|
||||||
|
|
||||||
|
|
|
@ -31,7 +31,7 @@ class StateManager:
|
||||||
rate_limit_period_s=5,
|
rate_limit_period_s=5,
|
||||||
):
|
):
|
||||||
# When a StateManager is shared via proxy to other processes, it has a thread itself.
|
# When a StateManager is shared via proxy to other processes, it has a thread itself.
|
||||||
process_title = "StateManager Proxy"
|
process_title = "BAPSicle - StateManager Proxy"
|
||||||
setproctitle(process_title)
|
setproctitle(process_title)
|
||||||
current_process().name = process_title
|
current_process().name = process_title
|
||||||
|
|
||||||
|
|
|
@ -58,7 +58,7 @@ if __name__ == "__main__":
|
||||||
# If it's not here, multiprocessing just doesn't run in the package.
|
# If it's not here, multiprocessing just doesn't run in the package.
|
||||||
# Freeze support refers to being packaged with Pyinstaller.
|
# Freeze support refers to being packaged with Pyinstaller.
|
||||||
multiprocessing.freeze_support()
|
multiprocessing.freeze_support()
|
||||||
setproctitle("BAPSicle Launcher")
|
setproctitle("BAPSicle - Launcher")
|
||||||
if len(sys.argv) > 1:
|
if len(sys.argv) > 1:
|
||||||
# We got an argument! It's probably Platypus's UI.
|
# We got an argument! It's probably Platypus's UI.
|
||||||
try:
|
try:
|
||||||
|
|
|
@ -1092,7 +1092,7 @@ class Player:
|
||||||
server_state: StateManager,
|
server_state: StateManager,
|
||||||
):
|
):
|
||||||
|
|
||||||
process_title = "Player: Channel " + str(channel)
|
process_title = "BAPSicle - Player: Channel " + str(channel)
|
||||||
setproctitle.setproctitle(process_title)
|
setproctitle.setproctitle(process_title)
|
||||||
multiprocessing.current_process().name = process_title
|
multiprocessing.current_process().name = process_title
|
||||||
|
|
||||||
|
|
|
@ -15,7 +15,7 @@ class PlayerHandler:
|
||||||
):
|
):
|
||||||
|
|
||||||
self.logger = LoggingManager("PlayerHandler")
|
self.logger = LoggingManager("PlayerHandler")
|
||||||
process_title = "Player Handler"
|
process_title = "BAPSicle - Player Handler"
|
||||||
setproctitle(process_title)
|
setproctitle(process_title)
|
||||||
current_process().name = process_title
|
current_process().name = process_title
|
||||||
|
|
||||||
|
|
|
@ -208,7 +208,7 @@ class BAPSicleServer:
|
||||||
if isMacOS() or isLinux():
|
if isMacOS() or isLinux():
|
||||||
multiprocessing.set_start_method("spawn", True)
|
multiprocessing.set_start_method("spawn", True)
|
||||||
|
|
||||||
process_title = "startServer"
|
process_title = "BAPSicle - startServer"
|
||||||
setproctitle(process_title)
|
setproctitle(process_title)
|
||||||
multiprocessing.current_process().name = process_title
|
multiprocessing.current_process().name = process_title
|
||||||
|
|
||||||
|
|
|
@ -544,7 +544,7 @@ def WebServer(player_to: List[Queue], player_from: Queue, state: StateManager):
|
||||||
api = MyRadioAPI(logger, state)
|
api = MyRadioAPI(logger, state)
|
||||||
alerts = AlertManager()
|
alerts = AlertManager()
|
||||||
|
|
||||||
process_title = "Web Server"
|
process_title = "BAPSicle - Web Server"
|
||||||
setproctitle(process_title)
|
setproctitle(process_title)
|
||||||
current_process().name = process_title
|
current_process().name = process_title
|
||||||
CORS(app, supports_credentials=True) # Allow ALL CORS!!!
|
CORS(app, supports_credentials=True) # Allow ALL CORS!!!
|
||||||
|
|
|
@ -33,7 +33,7 @@ class WebsocketServer:
|
||||||
self.player_to_q = in_q
|
self.player_to_q = in_q
|
||||||
self.player_from_q = out_q
|
self.player_from_q = out_q
|
||||||
|
|
||||||
process_title = "Websockets Server"
|
process_title = "BAPSicle - Websockets Server"
|
||||||
setproctitle(process_title)
|
setproctitle(process_title)
|
||||||
current_process().name = process_title
|
current_process().name = process_title
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue