temporalio / sdk-java

Temporal Java SDK
https://temporal.io
Apache License 2.0
200 stars 134 forks source link

[SpringBoot] Add graceful shutdown wait time as property #2026

Open Quinn-With-Two-Ns opened 3 months ago

Quinn-With-Two-Ns commented 3 months ago

Is your feature request related to a problem? Please describe. Currently when the worker factory is shutdown by Springboot on close there is no wait to for the shutdown to finish. This can cause the application to close before all inflight tasks are finished.

Describe the solution you'd like Add a property that will control how long the workerfactory waits before continuing shutdown.

Describe alternatives you've considered Users can manually work around this by adding a hook to the context close event and manually shutting down the factory and waiting.

Additional context