Skip to content
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 sd-notify #489

Merged
merged 1 commit into from
Aug 24, 2024
Merged

Add sd-notify #489

merged 1 commit into from
Aug 24, 2024

Conversation

wojnilowicz
Copy link
Contributor

@wojnilowicz wojnilowicz commented Jul 14, 2024

Currently, services dependent on aw-server.service (e.g. aw-awatcher) start just after its launch.

This patch causes systemd to launch the dependent services only after the rocket server is up an running.

It's aimed to help slow systems to not close the dependent service prematurely due to not being able to connect to the server.


🚀 This description was created by Ellipsis for commit 5031d85

Summary:

Change systemd service type to notify and integrate sd-notify to signal readiness in aw-server.

Key points:

  • Change Type from simple to notify in aw-server.service.
  • Add sd-notify dependency in aw-server/Cargo.toml.
  • Modify aw-server/src/main.rs to use sd_notify::notify to signal readiness after Rocket server ignition.

Generated with ❤️ by ellipsis.dev

Copy link

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❌ Changes requested. Reviewed everything up to 5031d85 in 28 seconds

More details
  • Looked at 61 lines of code in 3 files
  • Skipped 0 files when reviewing.
  • Skipped posting 0 drafted comments based on config settings.

Workflow ID: wflow_sPXk7KCNlx1yfxKX


Want Ellipsis to fix these issues? Tag @ellipsis-dev in a comment. You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

aw-server/src/main.rs Show resolved Hide resolved
@wojnilowicz
Copy link
Contributor Author

I'm going to add not yet existing service to aw-awatcher at 2e3s/awatcher#23

Currently, services dependent on aw-server.service (e.g. aw-awatcher)
start just after its launch.

This patch causes systemd to launch the dependent services only after
the rocket server is up an running.

It's aimed to help slow systems to not close the dependent service
prematurely due to not being able to connect to the server.
@wojnilowicz
Copy link
Contributor Author

ping

@brayo-pip
Copy link
Member

@wojnilowicz Erik is currently on vacation. He'll review it when he's back. Thanks for the PR.

@wojnilowicz
Copy link
Contributor Author

ping

@ErikBjare
Copy link
Member

Nice, thanks for the PR and ping!

@ErikBjare ErikBjare merged commit 8d7ce89 into ActivityWatch:master Aug 24, 2024
6 of 7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants