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
service: add sockets and keepalive variants #12790
service: add sockets and keepalive variants #12790
Conversation
Review period will end on 2022-01-26 at 18:30:16 UTC. |
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.
Looks good so far!
How many plists still need ported in homebrew-core?
These would be the last ones that aren't deprecated. |
Review period ended. |
3531198
to
11b799a
Compare
Just realised that I maybe should have held merging #12988 as I'm not sure how it would work API wise with what you're doing here. (Though the API can change until a new release is tagged - and I'll hold off doing so today.) Maybe it's fine - I'm guessing the change would be it would take a parameter for the "type" and it could default to |
I already spotted the services part of that PR and it's fine. |
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. |
210eab3
to
8c68a67
Compare
Okay, this is ready for another round now |
Library/Homebrew/service.rb
Outdated
if @keep_alive[:always].present? | ||
base[:KeepAlive] = @keep_alive[:always] | ||
elsif @keep_alive.key? :succesful_exit | ||
base[:KeepAlive] = { SuccessfulExit: @keep_alive[:succesful_exit] } | ||
elsif @keep_alive.key? :crashed | ||
base[:KeepAlive] = { Crashed: @keep_alive[:crashed] } | ||
elsif @keep_alive.key? :path | ||
base[:KeepAlive] = { PathState: @keep_alive[:path].to_s } | ||
end |
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.
if @keep_alive[:always].present? | |
base[:KeepAlive] = @keep_alive[:always] | |
elsif @keep_alive.key? :succesful_exit | |
base[:KeepAlive] = { SuccessfulExit: @keep_alive[:succesful_exit] } | |
elsif @keep_alive.key? :crashed | |
base[:KeepAlive] = { Crashed: @keep_alive[:crashed] } | |
elsif @keep_alive.key? :path | |
base[:KeepAlive] = { PathState: @keep_alive[:path].to_s } | |
end | |
if (always = @keep_alive[:always].presence) | |
base[:KeepAlive] = always | |
elsif @keep_alive.key?(:successful_exit) | |
base[:KeepAlive] = { SuccessfulExit: @keep_alive[:succesful_exit] } | |
elsif @keep_alive.key?(:crashed) | |
base[:KeepAlive] = { Crashed: @keep_alive[:crashed] } | |
elsif @keep_alive.key?(:path) | |
base[:KeepAlive] = { PathState: @keep_alive[:path].to_s } | |
end |
which of these keys are you still going to set if they are either false
or nil
(separate questions)?
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.
All except path for false
, for nil
I doubt there is a use.
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.
Any remaining comments based on this?
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.
Nah, find as-is.
8c68a67
to
d8c30ad
Compare
d8c30ad
to
3d5d12e
Compare
brew style
with your changes locally?brew typecheck
with your changes locally?brew tests
with your changes locally?This adds the last remaining features to services before we can deprecate plist usage.