(self, data: dict[str, Any])
| 334 | self._send_to_server(data) |
| 335 | |
| 336 | def _send_to_server(self, data: dict[str, Any]) -> None: |
| 337 | try: |
| 338 | requests.post(url=_USAGE_STATS_SERVER, json=data) |
| 339 | except requests.exceptions.RequestException as e: |
| 340 | # silently ignore unless we are using debug log |
| 341 | api_server_logger.debug(f"Failed to send usage data to server, errot: {str(e)}") |
| 342 | |
| 343 | def _report_continuous_usage(self): |
| 344 | """Report usage every 10 minutes.""" |