MCPcopy Create free account
hub / github.com/FlowiseAI/Flowise / onTerminate

Function onTerminate

packages/server/src/commands/base.ts:178–192  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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)

Callers

nothing calls this directly

Calls 1

stopProcessMethod · 0.45

Tested by

no test coverage detected