Skip to content

feat(client): add TaskProducer#633

Merged
bmckerry merged 1 commit into
mainfrom
ben/taskproducer
May 13, 2026
Merged

feat(client): add TaskProducer#633
bmckerry merged 1 commit into
mainfrom
ben/taskproducer

Conversation

@bmckerry
Copy link
Copy Markdown
Member

Ticket: https://linear.app/getsentry/issue/STREAM-950/create-the-taskproducer-abstraction-in-taskworker-client

This PR adds a TaskProducer class to the taskworker client. It works by taking an arroyo producer as argument, and when .produce() is called it tracks the producer future rather than returning it to the user.

Previously we talked about allowing the TaskProducer to use any producer internally (not just an arroyo one), but taskbroker_client already depends on arroyo and it'd be hard to get the typing to work otherwise (since arroyo producers can return SimpleProducerFuture, which needs to be handled differently from regular concurrent.future.Future's).

@bmckerry bmckerry requested a review from a team as a code owner May 12, 2026 21:23
Comment thread clients/python/src/taskbroker_client/worker/producer.py Outdated
Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 2 potential issues.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 3c5d377. Configure here.

Comment thread clients/python/src/taskbroker_client/worker/producer.py Outdated
Comment thread clients/python/src/taskbroker_client/worker/producer.py Outdated
@bmckerry bmckerry force-pushed the ben/taskproducer branch from 3c5d377 to 2552017 Compare May 13, 2026 15:44
@bmckerry bmckerry merged commit 5f7631c into main May 13, 2026
24 of 25 checks passed
@bmckerry bmckerry deleted the ben/taskproducer branch May 13, 2026 16:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants