Repository navigation
feat: keep the computer awake on Linux and macOS - #103
Merged
Merged
Conversation
…macOS A helper process holds the request while any bot is busy: caffeinate -i on macOS, an idle lock of systemd-inhibit on Linux. Like the power request on Windows it only stops sleep after inactivity, and it ends with the daemon. A helper that stops at once (no logind) is an error in the log.
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.
Closes one of the Linux/macOS gaps (spec 14.1): Keep the computer awake while bots work now works off Windows.
platform/unix/power.rs: while any bot is busy (and the setting is on), a helper process holds the request.caffeinate -i -w <daemon pid>.systemd-inhibit --what=idle --mode=blockaround ashthat waits for the daemon to go away.systemd-inhibitdoes with no logind, returns an error, which the caller logs.caffeinate.Manual test (not done yet)
pmset -g assertionslistscaffeinate.systemd-inhibit --listshowingBotloft.