Put BAPSicle in process names for htop filtering.

This commit is contained in:
Matthew Stratford 2022-03-12 15:01:51 +00:00
parent 81d986069f
commit aba31048cc
9 changed files with 9 additions and 9 deletions

View file

@ -21,7 +21,7 @@ class MattchBox(Controller):
self, player_to_q: List[Queue], player_from_q: Queue, state: StateManager
):
process_title = "ControllerHandler"
process_title = "BAPSicle - ControllerHandler"
setproctitle(process_title)
current_process().name = process_title

View file

@ -23,7 +23,7 @@ class FileManager:
self.logger = LoggingManager("FileManager")
self.api = MyRadioAPI(self.logger, server_config)
process_title = "File Manager"
process_title = "BAPSicle - File Manager"
setproctitle(process_title)
current_process().name = process_title

View file

@ -31,7 +31,7 @@ class StateManager:
rate_limit_period_s=5,
):
# 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)
current_process().name = process_title

View file

@ -58,7 +58,7 @@ if __name__ == "__main__":
# If it's not here, multiprocessing just doesn't run in the package.
# Freeze support refers to being packaged with Pyinstaller.
multiprocessing.freeze_support()
setproctitle("BAPSicle Launcher")
setproctitle("BAPSicle - Launcher")
if len(sys.argv) > 1:
# We got an argument! It's probably Platypus's UI.
try:

View file

@ -1092,7 +1092,7 @@ class Player:
server_state: StateManager,
):
process_title = "Player: Channel " + str(channel)
process_title = "BAPSicle - Player: Channel " + str(channel)
setproctitle.setproctitle(process_title)
multiprocessing.current_process().name = process_title

View file

@ -15,7 +15,7 @@ class PlayerHandler:
):
self.logger = LoggingManager("PlayerHandler")
process_title = "Player Handler"
process_title = "BAPSicle - Player Handler"
setproctitle(process_title)
current_process().name = process_title

View file

@ -208,7 +208,7 @@ class BAPSicleServer:
if isMacOS() or isLinux():
multiprocessing.set_start_method("spawn", True)
process_title = "startServer"
process_title = "BAPSicle - startServer"
setproctitle(process_title)
multiprocessing.current_process().name = process_title

View file

@ -544,7 +544,7 @@ def WebServer(player_to: List[Queue], player_from: Queue, state: StateManager):
api = MyRadioAPI(logger, state)
alerts = AlertManager()
process_title = "Web Server"
process_title = "BAPSicle - Web Server"
setproctitle(process_title)
current_process().name = process_title
CORS(app, supports_credentials=True) # Allow ALL CORS!!!

View file

@ -33,7 +33,7 @@ class WebsocketServer:
self.player_to_q = in_q
self.player_from_q = out_q
process_title = "Websockets Server"
process_title = "BAPSicle - Websockets Server"
setproctitle(process_title)
current_process().name = process_title