Open mattbishop opened 1 year ago
I am closing a toad scheduler instance using a shutdown hook and I often see this error when the hook calls stop():
Cannot read properties of undefined (reading 'engines') err: { "type": "TypeError", "message": "Cannot read properties of undefined (reading 'engines')", "stack": TypeError: Cannot read properties of undefined (reading 'engines') at stop (/Users/matt/Projects/monorepo/node_modules/toad-scheduler/dist/lib/toadScheduler.js:40:49) at fn (file:///Users/matt/Projects/monorepo/admin-api/src/shutdown.ts:8:36) at async run (/Users/matt/monorepo/node_modules/close-with-grace/index.js:92:19) }
Not sure what is happening exactly, but a bit more defensiveness with checking for engines !== undefined would help the close() function.
engines !== undefined
thank you for the report! will take a look
I am closing a toad scheduler instance using a shutdown hook and I often see this error when the hook calls stop():
Not sure what is happening exactly, but a bit more defensiveness with checking for
engines !== undefined
would help the close() function.