MCPcopy Index your code
hub / github.com/FlowiseAI/Flowise / onTerminate

Function onTerminate

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

Source from the content-addressed store, hash-verified

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)

Callers

nothing calls this directly

Calls 1

stopProcessMethod · 0.45

Tested by

no test coverage detected