发布

  • fix: replace sync thread telemetry with async aiohttp (#2283)

    frostbyte_neo 发布于 2026-03-05 15:12:42 +00:00

    The thread+queue approach used requests.post (synchronous) which holds
    OS resources (thread stack, TCP connection) blocking while waiting for a
    response. Replace with fully async aiohttp and fire-and-forget via
    asyncio.create_task() — no threads needed for telemetry.

    Description

    Acceptance Criteria

    Type of Change

    • Bug fix (non-breaking change that fixes an issue)
    • New feature (non-breaking change that adds functionality)
    • Code refactoring
    • Other (please specify):

    Screenshots

    Pre-submission Checklist

    • I have tested my changes thoroughly before submitting this PR
      (See CONTRIBUTING.md)
    • This PR contains minimal changes necessary to address the
      issue/feature
    • My code follows the project's coding standards and style
      guidelines
    • I have added tests that prove my fix is effective or that my
      feature works
    • I have added necessary documentation (if applicable)
    • All new and existing tests pass
    • I have searched existing PRs to ensure this change hasn't been
      submitted already
    • I have linked any relevant issues in the description
    • My commits have clear and descriptive messages

    DCO Affirmation

    I affirm that all code in every commit of this pull request conforms to
    the terms of the Topoteretes Developer Certificate of Origin.

    Summary by CodeRabbit

    • Improvements
    • Telemetry system has been refactored to operate asynchronously and
      non-blocking, eliminating background worker threads. This optimization
      reduces resource consumption and ensures the application remains
      responsive during telemetry operations, providing a smoother user
      experience without any performance impact.
    下载附件