MCPcopy Create free account
hub / github.com/FastLED/FastLED / DaemonStatus

Class DaemonStatus

ci/util/pio_package_messages.py:109–206  ·  view source on GitHub ↗

Daemon → Client: Status update message. This message is written to the status file by the daemon to communicate current state and progress to clients. Attributes: state: Current daemon state message: Human-readable status message updated_at: Unix timestamp of la

Source from the content-addressed store, hash-verified

107@typechecked
108@dataclass
109class DaemonStatus:
110 """Daemon → Client: Status update message.
111
112 This message is written to the status file by the daemon to communicate
113 current state and progress to clients.
114
115 Attributes:
116 state: Current daemon state
117 message: Human-readable status message
118 updated_at: Unix timestamp of last status update
119 installation_in_progress: Whether installation is actively running
120 daemon_pid: Process ID of the daemon
121 daemon_started_at: Unix timestamp when daemon started
122 caller_pid: Process ID of client whose request is being processed
123 caller_cwd: Working directory of client whose request is being processed
124 request_id: ID of the request currently being processed
125 request_started_at: Unix timestamp when current request started
126 environment: PlatformIO environment being installed
127 project_dir: Project directory for current installation
128 current_operation: Detailed description of current operation
129 """
130
131 state: DaemonState
132 message: str
133 updated_at: float
134 installation_in_progress: bool = False
135 daemon_pid: int | None = None
136 daemon_started_at: float | None = None
137 caller_pid: int | None = None
138 caller_cwd: str | None = None
139 request_id: str | None = None
140 request_started_at: float | None = None
141 environment: str | None = None
142 project_dir: str | None = None
143 current_operation: str | None = None
144
145 def to_dict(self) -> dict[str, Any]:
146 """Convert to dictionary for JSON serialization.
147
148 Returns:
149 Dictionary representation of the status
150 """
151 result = asdict(self)
152 # Convert DaemonState enum to string value
153 result["state"] = self.state.value
154 return result
155
156 @classmethod
157 def from_dict(cls, data: dict[str, Any]) -> "DaemonStatus":
158 """Create DaemonStatus from dictionary.
159
160 Args:
161 data: Dictionary with status fields
162
163 Returns:
164 DaemonStatus instance
165
166 Raises:

Callers 8

read_status_fileFunction · 0.90
read_status_file_safeFunction · 0.90
update_statusFunction · 0.90
test_create_statusMethod · 0.90
test_to_dictMethod · 0.90
test_roundtripMethod · 0.90
test_is_staleMethod · 0.90
test_get_age_secondsMethod · 0.90

Calls

no outgoing calls

Tested by 5

test_create_statusMethod · 0.72
test_to_dictMethod · 0.72
test_roundtripMethod · 0.72
test_is_staleMethod · 0.72
test_get_age_secondsMethod · 0.72