puma icon indicating copy to clipboard operation
puma copied to clipboard

Periodically send status to systemd

Open ekohl opened this issue 3 years ago • 2 comments

Description

With systemd it's possible to send a status line. This will show up when users run systemctl status puma.service.

Most of this code is based on puma-plugin-systemd.

At the moment this is completely untested, but I had written some code that I wanted to share. If anyone wants to finish this before I do, they should feel welcome to.

Closes #2604

Your checklist for this pull request

  • [x] I have reviewed the guidelines for contributing to this repository.
  • [ ] I have added (or updated) appropriate tests if this PR fixes a bug or adds a feature.
  • [x] My pull request is 100 lines added/removed or less so that it can be easily reviewed.
  • [ ] If this PR doesn't need tests (docs change), I added [ci skip] to the title of the PR.
  • [x] If this closes any issues, I have added "Closes #issue" to the PR description or my commit messages.
  • [ ] I have updated the documentation accordingly.
  • [ ] All new and existing tests passed, including Rubocop.

ekohl avatar Feb 22 '22 10:02 ekohl

Happy to make this happen, but we should take the approach of providing APIs necessary for a plugin to provide this functionality.

nateberkopec avatar Feb 25 '22 15:02 nateberkopec

This is still very much a draft since I didn't actually test this yet, but I took a stab at rewriting the systemd integration as a plugin that is automatically loaded. I wonder if this is a good direction to take. If so, I can clean up the patch and split it in two (first one that transforms it into a plugin, then one that adds status watching).

ekohl avatar May 23 '22 22:05 ekohl

To me this looks great. I think if you rebase and add tests it's good to go.

nateberkopec avatar Oct 18 '22 06:10 nateberkopec

I've rebased it to resolve conflicts, but I don't have time to write tests right now. If anyone does have the time, I'd highly welcome it.

ekohl avatar Oct 27 '22 11:10 ekohl

Adding the contrib-wanted label.

nateberkopec avatar Oct 28 '22 05:10 nateberkopec

Closing in favour of https://github.com/puma/puma/pull/3006

dentarg avatar Jan 12 '23 13:01 dentarg