-
Notifications
You must be signed in to change notification settings - Fork 416
Add missing await to sleep calls
#18763
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
Conversation
|
"oops" 😬 |
|
CI failures are a flaky test. Merging manually. |
| except LimitExceededError as e: | ||
| if e.pause: | ||
| self._clock.sleep(e.pause) | ||
| await self._clock.sleep(e.pause) |
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.
Is this something we can lint?
We already detect this kind of thing for async/await
error: Value of type "Coroutine[Any, Any, None]" must be used [unused-coroutine]
note: Are you missing an await?
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.
Oh mmm, we probably want to change the return type of sleep
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.
I did this here: #18772
This helps ensure that mypy can catch places where we don't await on it, like in #18763.
This helps ensure that mypy can catch places where we don't await on it, like in #18763. --------- Co-authored-by: Eric Eastwood <[email protected]>
Reported by @realtyem in DMs. The consequence was that logcontexts became lost for these code paths:
Missed in #18546 and #18595.
cc @erikjohnston
Pull Request Checklist
EventStoretoEventWorkerStore.".code blocks.