Repository navigation
fix: backport five regression fixes to rc/1.103.0 #43331
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
Changes from all commits
bda27a8
4d9db69
3d097d7
ab38d71
528cce8
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -40,10 +40,24 @@ def setup_sync_task(self, default_sync_interval: float | None): | |
| self.periodic_sync_in_memory_spend_with_redis(default_sync_interval=default_sync_interval) | ||
| ) | ||
|
|
||
| def cancel_sync_task(self) -> None: | ||
| if self._sync_task is not None: | ||
| self._sync_task.cancel() | ||
|
|
||
| def retire(self) -> None: | ||
| self.cancel_sync_task() | ||
| if not self.redis_increment_operation_queue: | ||
| return | ||
| try: | ||
| loop: Final = asyncio.get_running_loop() | ||
| except RuntimeError: | ||
| return | ||
| loop.create_task(self._push_in_memory_increments_to_redis()) | ||
|
Comment on lines
+51
to
+55
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If a synchronous |
||
|
|
||
| async def cleanup(self): | ||
| """Cleanup method to be called when shutting down""" | ||
| if self._sync_task is not None: | ||
| self._sync_task.cancel() | ||
| self.cancel_sync_task() | ||
| try: | ||
| await self._sync_task | ||
| except asyncio.CancelledError: | ||
|
|
||
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 a caller changes the dictionary previously passed as
routing_strategy_argsand passes that same dictionary toupdate_settings(), this comparison checks the dictionary against itself. It skips rebuilding the selector, so the router reports the new arguments while routing still uses the old values.