(self)
| 199 | return _get_online_model_path().exists() |
| 200 | |
| 201 | def status(self) -> dict[str, Any]: |
| 202 | now = self._now() |
| 203 | hourly = sum(1 for t in self._update_ts if now - t < 3600) |
| 204 | return { |
| 205 | "pending_contexts": self.pending_count, |
| 206 | "total_online_updates": self._total_updates, |
| 207 | "updates_last_hour": hourly, |
| 208 | "online_model_active": self.online_model_active, |
| 209 | "max_updates_per_hour": self._max_hourly, |
| 210 | } |
| 211 | |
| 212 | def clear_pending(self) -> int: |
| 213 | cleared = len(self._buffer) |