-
Notifications
You must be signed in to change notification settings - Fork 34
fix: improve confluent kafka's global variable access #834
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
CagriYonca
commented
Jan 12, 2026
- Close the consumer span when the poll request returns None.
- Improve the consumer_token and consumer_span access.
Signed-off-by: Cagri Yonca <[email protected]>
| context.detach(consumer_token) | ||
| consumer_token = None | ||
| token = consumer_token.get(None) | ||
| if token is not None: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| if token is not None: | |
| if token: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PEP8 document refers using is not None for checking None conditions:
|
| create_span("poll", res.topic(), res.headers()) | ||
| else: | ||
| span = consumer_span.get(None) | ||
| if span is not None: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| if span is not None: | |
| if span: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PEP8 document refers using is not None for checking None conditions:


