15 lines
420 B
TypeScript
15 lines
420 B
TypeScript
import { Shutdown } from './shutdown';
|
|
|
|
// Export only what's actually used
|
|
export { Shutdown } from './shutdown';
|
|
export { SHUTDOWN_DEFAULTS } from './constants';
|
|
|
|
// Convenience function used by queue-manager
|
|
export function onShutdown(
|
|
callback: () => Promise<void> | void,
|
|
priority?: number,
|
|
name?: string
|
|
): void {
|
|
const shutdown = Shutdown.getInstance();
|
|
shutdown.onShutdown(callback, priority, name);
|
|
}
|