Function: startSignal()
startSignal():
AbortSignalLike
Defined in: src/utils/lifecycle.ts:649
A dependency that gives a lifecycle hook the start signal: the signal passed to startLifecycle(), which aborts when the start takes too long. Pass it on to the work the hook waits for (a connection, a request), so that work stops too. Outside a start, and without a signal option, it never aborts.
Returns
Example
ts
app.addSingleton(
lifecycle.init('config'),
async (client, signal) => {
await client.load({ signal }); // cancelled when the start times out
},
['configClient', startSignal],
);
await startLifecycle(app, { signal: AbortSignal.timeout(30_000) });