Convert to dictionary for JSON serialization. Returns: Dictionary representation of the status
(self)
| 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": |
no outgoing calls