-
Notifications
You must be signed in to change notification settings - Fork 1
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
Add scheduled delete #3
Conversation
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.
Not sure how I feel about this approach.
A lot of me favours a polling approach using kopf timers where we check to see if the current time is after the notAfter
time and delete if it is.
The implementation would be a lot simpler, but obviously the delete might not happen until the polling interval after notAfter
. However, the execution time of async tasks is also not completely deterministic either, since it is relying on cooperative concurrency.
Because we are using asyncio
, I don't have any concerns over scaling with the timers approach. In fact I have more concerns over tracking a large number of tasks.
Yeah, I got confused with the timers really, couldn't decide on a polling interval, probably simpler than tracking tasks though. Thoughts? I guess the memo can hold the time, so we just check that in the timer? |
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.
This looks much nicer with the timers, I think.
And add extra test for skipping the delete.
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.
Just one minor change
OK, ready for review again. That last comment opened a whole can of (quite useful!) worms. |
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.
LGTM
No description provided.