()
| 176 | } |
| 177 | |
| 178 | protected onTerminate() { |
| 179 | return async () => { |
| 180 | try { |
| 181 | // Shut down the app after timeout if it ever stuck removing pools |
| 182 | setTimeout(async () => { |
| 183 | logger.info('Flowise was forced to shut down after 30 secs') |
| 184 | await this.failExit() |
| 185 | }, 30000) |
| 186 | |
| 187 | await this.stopProcess() |
| 188 | } catch (error) { |
| 189 | logger.error('There was an error shutting down Flowise...', error) |
| 190 | } |
| 191 | } |
| 192 | } |
| 193 | |
| 194 | protected async gracefullyExit() { |
| 195 | process.exit(EXIT_CODE.SUCCESS) |
nothing calls this directly
no test coverage detected