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