shutdownAsync(_:)
LifecycleHandler.swift:71func shutdownAsync(_ application: Application) async
func shutdownAsync(_ application: Application) async
s5Vapor16LifecycleHandlerPAAE13shutdownAsyncyyAA11ApplicationCYaF
What are these?1G64S
import Vapor
Vapor is a framework for building server applications, APIs and websites in Swift. It provides a safe, performant and scalable foundation for building large complex backends.
protocol LifecycleHandler : Sendable
Provides a way to hook into lifecycle events of a Vapor application. You can register your handlers with the Application
to be notified when the application is about to start up, has started up and is about to shutdown
final class Application
Core type representing a Vapor application.
func shutdownAsync(_ application: Application) async
Called when the application is about to boot up. This is the asynchronous version of shutdown(_:)
. When adopting the async APIs you should ensure you provide a compatitble implementation for shutdown(_:)
as well if you want to support older users still running in a non-async context Note your application must be running in an asynchronous context and initialised with make(_:_:)
for this handler to be called
func didBoot(_ application: Application) throws
func didBootAsync(_ application: Application) async throws
func shutdown(_ application: Application)
func willBoot(_ application: Application) throws
func willBootAsync(_ application: Application) async throws