-
Notifications
You must be signed in to change notification settings - Fork 2
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
Support skipWaiting initially but keep periodically checking afterwards #6
Comments
@mpl I agree with having this mode, and I've also changed this logic slightly locally when I switched modes because I also found out I wanted this instead of the current mode 2 behaviour, which is useful for e2e/ci testing but less in production. So I'm happy to change the logic to achieve the use case of: skip initial waiting + keep periodically checking. Although I would differ a bit from what you are suggesting. Doing what you are suggesting changes the current meaning we put into skipWaiting. I would be more inclined to add a new say: runOnce flag, that does the exiting after the first WDYT? |
I'm confused. Do you agree that at the moment the description of skipWaiting is a lie, because it does not specify that we exit after the first run (which is unexpected imho)?
So just to be clear:
If yes, then why not. |
Yes, that was what I was thinking.
Yes that could make sense too. I don't think there was any special reason why we did that initially. I'm happy with changing it. |
Personally, I would find it easiest to see a code change to discuss/review, so once you two reach agreement, feel free to loop me into a PR review :) |
Cool. Want me to open a PR? |
@mpl sounds good, thanks! |
- new default behaviour: an update check is always attempted right from the start, regardless of check_frequency value. - run_once: controls whether we exit right after the initial update check. - skip_waiting: removed Fixes gokrazy#6
- new default behaviour: an update check is always attempted right from the start, regardless of check_frequency value. - run_once: controls whether we exit right after the initial update check. - skip_waiting: removed Fixes gokrazy#6
Currently the logic supports:
1 - initial waiting for 1 frequency period, then check for update (conditionally perform one), then wait again, and repeat infinitely
2 - skip initial waiting by specifying the skipWaiting, check for update (conditionally perform one), then exit(0)
We should modify mode 2 or support a third mode that skips the initial waiting, perform the check for an update, and then repeat this indefinitely.
The text was updated successfully, but these errors were encountered: