Show proxy manager threads in VScode debugger

This commit is contained in:
Matthew Stratford 2021-09-24 21:13:22 +01:00
parent d6751dc41f
commit 5d0d1117ea

View file

@ -5,6 +5,8 @@ import time
from datetime import datetime
from copy import copy
from typing import Any, Dict, List
from setproctitle import setproctitle
from multiprocessing import current_process
from baps_types.plan import PlanItem
from helpers.logging_manager import LoggingManager
@ -28,6 +30,11 @@ class StateManager:
rate_limit_params=[],
rate_limit_period_s=5,
):
# When a StateManager is shared via proxy to other processes, it has a thread itself.
process_title = "StateManager Proxy"
setproctitle(process_title)
current_process().name = process_title
self.logger = logger
path_dir: str = resolve_external_file_path("/state")