Fixed issues with telemetry.
This commit is contained in:
@@ -14,6 +14,10 @@ from typing import TYPE_CHECKING, Callable, Mapping
|
||||
|
||||
from ...paths import AppPaths
|
||||
from ...self_update import LauncherUpdateCheck
|
||||
from ...telemetry import (
|
||||
TELEMETRY_OPERATION_PROCESS_ROLE,
|
||||
TELEMETRY_PROCESS_ROLE_VARIABLE,
|
||||
)
|
||||
|
||||
|
||||
if TYPE_CHECKING:
|
||||
@@ -465,6 +469,18 @@ def launcher_child_command(*arguments: str) -> list[str]:
|
||||
return [sys.executable, "-B", "-m", "ptlinux", *arguments]
|
||||
|
||||
|
||||
def launcher_child_environment(
|
||||
environment: Mapping[str, str] | None = None,
|
||||
) -> dict[str, str]:
|
||||
"""Mark an internal CLI process as part of the current dashboard session."""
|
||||
|
||||
child_environment = dict(os.environ if environment is None else environment)
|
||||
child_environment[TELEMETRY_PROCESS_ROLE_VARIABLE] = (
|
||||
TELEMETRY_OPERATION_PROCESS_ROLE
|
||||
)
|
||||
return child_environment
|
||||
|
||||
|
||||
def dashboard_poll_interval(
|
||||
*,
|
||||
operation_active: bool,
|
||||
|
||||
Reference in New Issue
Block a user