swift-server / swift-service-lifecycle

Cleanly startup and shutdown server application, freeing resources in order before exiting.
https://swiftpackageindex.com/swift-server/swift-service-lifecycle/documentation/servicelifecycle
Apache License 2.0
385 stars 37 forks source link

Provide a `ServiceGroupConfiguration` initializer without `gracefulSh… #147

Closed FranzBusch closed 1 year ago

FranzBusch commented 1 year ago

…utdownSignals` signals

Motivation

When using the ServiceGroup in non-top-level setups such as inside a Service.run() method then it is confusing if you are forced to pass gracefulShutdownSignals.

Modification

This PR adds a new initializer to ServiceGroupConfiguration which takes no arguments.

Result

Less confusion when using the service group inside a non-top-level context.

FranzBusch commented 1 year ago

Closing this in favour of: https://github.com/swift-server/swift-service-lifecycle/pull/148