Skip to content

worker_telemetry repeats the decode that _decode_text provides #81

Description

@codingjoe

Found while reviewing PR #69 with the SuperJoe crew. Filed as out-of-scope there.

RedisTaskBackend.worker_telemetry() decodes each pub/sub message with data.decode() if isinstance(data, bytes) else data. _decode_text() now applies the same bytes-or-str rule in this module. The helper also covers the missing reply. A REDIS_URL with decode_responses=True reaches both paths. The helper keeps the reply-shape rule in one place. That is why it exists.

Reference: threadmill/backends/redis.py, worker_telemetry.

Activity

  1. added
    bloatOver-engineering and dead code
    duhHand-rolled thing the standard library ships
    side questOut-of-scope finding, deferred to its own issue
    on Oct 5, 2026
  2. changed the title [-]worker_telemetry hand-rolls the decode _decode_text provides[/-] [+]worker_telemetry repeats the decode that _decode_text provides[/+] on Oct 5, 2026
  3. codingjoe commented on Oct 6, 2026

    @codingjoe
    OwnerAuthor

    The _decode_text helper is gone, so there is no helper left to reuse. The module decodes each reply at its read site. worker_telemetry decodes its pubsub data inline.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bloatOver-engineering and dead codeduhHand-rolled thing the standard library shipsside questOut-of-scope finding, deferred to its own issue

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions