Skip to content

Conversation

@zachaysan
Copy link
Contributor

Changes

This enables realtime mode for the Ruby client. Once the realtime endpoint provides a newly updated timestamp, the call to update the environment is triggered.

Testing

I manually tested against production data and verified that the realtime endpoint returns expected data. I also wrote five new tests that cover what was implemented.

@zachaysan zachaysan requested a review from khvn26 December 2, 2024 16:28
Copy link
Member

@khvn26 khvn26 left a comment

Choose a reason for hiding this comment

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

Looks good overall, aside from one question.

Comment on lines +52 to +56
rescue Faraday::ConnectionFailed, Faraday::TimeoutError => e
@config.logger.warn "Connection failed: #{e.message}. Retrying in #{retry_interval} seconds..."
rescue StandardError => e
@config.logger.error "Error: #{e.message}. Retrying in #{retry_interval} seconds..."
end
Copy link
Member

Choose a reason for hiding this comment

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

I can't quite understand the reasoning behind different logging levels for different errors here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The reason why we warn for a connection failed error is that it is expected behaviour. The SSE connection is, by design, going to fail after a poll of 30 seconds.

@zachaysan zachaysan merged commit 536ad9f into main Dec 5, 2024
4 checks passed
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.

3 participants