Skip to content

Conversation

@luxscious
Copy link
Contributor

ld-eventsource was emitting comment events that we weren’t handling, causing the SDK to fall back to a 1s SSE polling interval when no polling options were set.

fix: handle comment events.
fix: increase base polling time to 30 seconds.

also adjust default polling time to be 30 seconds
@luxscious luxscious requested a review from a team as a code owner December 4, 2025 20:26
Copilot AI review requested due to automatic review settings December 4, 2025 20:26
@luxscious luxscious requested a review from a team December 4, 2025 20:27
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR fixes an issue where the SDK was falling back to a 1-second polling interval due to unhandled SSE Comment events. The changes address this by handling Comment events and increasing the default polling interval to 30 seconds.

Key changes:

  • Added handling for ld_eventsource.actions.Comment events in the SSE manager
  • Increased default config_polling_interval_ms from 1000ms to 30000ms

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
devcycle_python_sdk/options.py Increases the default polling interval from 1 second to 30 seconds to reduce unnecessary polling when SSE is connected
devcycle_python_sdk/managers/sse_manager.py Adds Comment event handling to mark SSE connection as active and prevent fallback to short polling intervals

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@luxscious luxscious requested a review from JamieSinn December 4, 2025 21:10
@luxscious luxscious merged commit 4b0fa5d into main Dec 4, 2025
12 checks passed
@luxscious luxscious deleted the tso-331-python-sdk-polling-for-config-every-1-second-when-sse branch December 4, 2025 21:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants