emmett-framework / granian

A Rust HTTP server for Python applications
BSD 3-Clause "New" or "Revised" License
2.9k stars 85 forks source link

Systemd notify protocol #381

Open vooon opened 3 months ago

vooon commented 3 months ago

It might be nice to support systemd's Type=notify option.

Funding

Fund with Polar

gi0baro commented 3 months ago

Can you expand on the use case for this? How do you expect to use SystemD notify with Granian or, in other words, which features of SystemD notify will improve current usage of Granian with SystemD?

vooon commented 3 months ago

That may improve the case, when other unit depends on some api server to be ready (on the same node).

With Type=simple unit will be active as soon as it starts granian.

With Type=notify you can signal readiness after you load app and start listening.