828 optimize data retrieval and clean it up#829
Open
bogadisa wants to merge 6 commits into
Open
Conversation
bogadisa
force-pushed
the
828-optimize-data-retrieval-and-clean-it-up
branch
from
July 18, 2026 19:11
624224c to
4215ff5
Compare
bogadisa
commented
Jul 26, 2026
| crashed: bool = False, | ||
| listener_id: int = None, | ||
| ) -> dict[Future, Literal["listener_0", "listener_1"]]: | ||
| if settings.MANUAL_NEXT_CHANGE_ID: |
Collaborator
Author
There was a problem hiding this comment.
make it depend on league
bogadisa
commented
Jul 26, 2026
| logger.info("Initializing follow stream threads") | ||
| self.rate_limiter = RateLimiterThreadSafe() | ||
| self.mini_batch_size = settings.MINI_BATCH_SIZE | ||
| self.pending_queue = Queue(maxsize=self.mini_batch_size) |
bogadisa
commented
Jul 26, 2026
| max_connections=2, | ||
| max_keepalive_connections=2, | ||
| ), | ||
| timeout=httpx.Timeout(10, read=60), |
bogadisa
commented
Jul 26, 2026
| ) | ||
| logging.getLogger("httpx").setLevel(logging.WARNING) | ||
| futures = {} | ||
| if (listener_id is None and not crashed) or listener_id == 0: |
bogadisa
commented
Jul 26, 2026
| while i < self.mini_batch_size: | ||
| try: | ||
| pending: PendingResponse | None = self.pending_queue.get(timeout=30) | ||
| except Empty: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.