stop method
Stop the server gracefully, in every isolate:
- stop taking new connections
- wait for open requests, up to
config.shutdownTimeout - run the
DoxShutdownservices (eg. close database connections) - close the cache stores (eg. Redis connections)
SIGTERM and SIGINT call this, then exit the process.
await Dox().stop();
Implementation
Future<void> stop() async {
_cancelSignals();
await Future.wait(<Future<void>>[
DoxIsolate().stopAll(config.shutdownTimeout),
stopIsolate(),
]);
}