| 328 | } |
| 329 | |
| 330 | public async stop() { |
| 331 | clearInterval(this.metricsSaveIntervalID as unknown as number); |
| 332 | return Promise.all([ |
| 333 | this.server?.shutdown(), |
| 334 | this.browserManager.shutdown(), |
| 335 | this.config.shutdown(), |
| 336 | this.fileSystem.shutdown(), |
| 337 | this.limiter.shutdown(), |
| 338 | this.metrics.shutdown(), |
| 339 | this.monitoring.shutdown(), |
| 340 | this.router.shutdown(), |
| 341 | this.token.shutdown(), |
| 342 | this.webhooks.shutdown(), |
| 343 | this.hooks.shutdown(), |
| 344 | ]); |
| 345 | } |
| 346 | |
| 347 | public async start() { |
| 348 | const httpRoutes: Array<HTTPRoute | BrowserHTTPRoute> = []; |