Skip to content

[LOW] Python SDK Threading.Timer creates new asyncio event loop per flush #74

@Divkix

Description

@Divkix

Severity: Low

File: sdks/python/src/logwell/queue.py:149-154

Impact

threading.Timer callback runs in a daemon thread with no event loop. Each fire calls asyncio.run(self.flush()) which creates and destroys a new event loop. No httpx.AsyncClient connection pool reuse across flushes. Pure overhead, functionally correct.

Fix

Use asyncio-based timer (e.g. asyncio.create_task + asyncio.sleep loop) or a dedicated event loop thread.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions