Open
Conversation
c749406 to
8ae7aa7
Compare
Contributor
Author
|
Setting that one in draft, and waiting on #1364 |
b1b4367 to
6148705
Compare
6148705 to
20271a1
Compare
Contributor
Author
Ready for review :) |
mickmis
approved these changes
Mar 4, 2026
| flight | ||
| for flight in self.flights | ||
| if flight.get_span()[1] | ||
| and flight.get_span()[1] + FLIGHTS_LIMIT > arrow.utcnow().datetime # pyright: ignore[reportOptionalOperand] |
Contributor
There was a problem hiding this comment.
pyright is not smart enough to ignore this on its own given the first condition?
Contributor
Author
There was a problem hiding this comment.
Actually he is smart, because as it's a function, it may return a different value the second time ^^'
Contributor
There was a problem hiding this comment.
Oh
Not that we want that though
Does this work? Just learned about assignment expressions
Suggested change
| and flight.get_span()[1] + FLIGHTS_LIMIT > arrow.utcnow().datetime # pyright: ignore[reportOptionalOperand] | |
| if (end_time := flight.get_span()[1]) | |
| and end_time + FLIGHTS_LIMIT > arrow.utcnow().datetime |
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.
Similar to #1361 and #1364 , but for notifications/flights on rid side.
Automatically cleanup notifications >1h, to avoid notification build-up and test record flights.
Contribute to #1059