fixed lint

This commit is contained in:
Boki 2025-06-26 15:44:52 -04:00
parent 885b484a37
commit 8680b6ec20
2 changed files with 15 additions and 9 deletions

View file

@ -1,6 +1,6 @@
import { getLogger } from '@stock-bot/logger';
import type { ShutdownCallback, ShutdownOptions } from './types';
import { SHUTDOWN_DEFAULTS } from './constants';
import type { ShutdownCallback, ShutdownOptions } from './types';
interface CallbackEntry {
callback: ShutdownCallback;
@ -34,7 +34,7 @@ export class Shutdown {
* Register a cleanup callback
*/
onShutdown(callback: ShutdownCallback, priority: number = SHUTDOWN_DEFAULTS.MEDIUM_PRIORITY, name?: string): void {
if (this.isShuttingDown) return;
if (this.isShuttingDown) { return };
this.callbacks.push({ callback, priority, name });
}
@ -42,7 +42,7 @@ export class Shutdown {
* Initiate graceful shutdown
*/
async shutdown(): Promise<void> {
if (this.isShuttingDown) return;
if (this.isShuttingDown) { return };
this.isShuttingDown = true;
@ -71,7 +71,7 @@ export class Shutdown {
}
private setupSignalHandlers(): void {
if (this.signalHandlersRegistered) return;
if (this.signalHandlersRegistered) { return };
const signals: NodeJS.Signals[] = ['SIGTERM', 'SIGINT'];