()
| 370 | } |
| 371 | |
| 372 | async stopApp() { |
| 373 | try { |
| 374 | this.sseStreamer.stopHeartbeat() |
| 375 | const removePromises: any[] = [] |
| 376 | removePromises.push(this.telemetry.flush()) |
| 377 | if (this.queueManager) { |
| 378 | removePromises.push(this.redisSubscriber.disconnect()) |
| 379 | } |
| 380 | await Promise.all(removePromises) |
| 381 | } catch (e) { |
| 382 | logger.error(`❌[server]: Flowise Server shut down error: ${e}`) |
| 383 | } |
| 384 | } |
| 385 | } |
| 386 | |
| 387 | let serverApp: App | undefined |
no test coverage detected