Start the heartbeat thread.
(self, message: str = "Compiling")
| 59 | self._last_message = "" |
| 60 | |
| 61 | def start(self, message: str = "Compiling") -> None: |
| 62 | """Start the heartbeat thread.""" |
| 63 | if not _IS_CI: |
| 64 | return # Only run heartbeat in CI environments |
| 65 | |
| 66 | self._last_message = message |
| 67 | self._start_time = time.time() |
| 68 | self._stop_event.clear() |
| 69 | self._thread = threading.Thread(target=self._heartbeat_loop, daemon=True) |
| 70 | self._thread.start() |
| 71 | |
| 72 | def update_message(self, message: str) -> None: |
| 73 | """Update the status message shown in heartbeat.""" |