@sidequest/engine
Version:
@sidequest/engine is the core engine of SideQuest, a distributed background job processing system for Node.js and TypeScript.
10 lines (8 loc) • 386 B
TypeScript
/**
* Registers handlers for SIGINT and SIGTERM to gracefully shut down the process.
* @param fn The async function to run during shutdown.
* @param tag A label for logging.
*/
declare function gracefulShutdown(fn: () => void | Promise<void>, tag: string, enabled: boolean): void;
declare function clearGracefulShutdown(): void;
export { clearGracefulShutdown, gracefulShutdown };