removing deprecations

This commit is contained in:
Boki 2025-06-24 15:32:56 -04:00
parent fa67d666dc
commit f6038d385f
21 changed files with 91 additions and 158 deletions

View file

@ -1,3 +1,4 @@
import type { Collection } from 'mongodb';
import { createNamespacedCache } from '@stock-bot/cache';
import { getLogger } from '@stock-bot/logger';
import type {
@ -10,7 +11,6 @@ import type {
ServiceTypes,
} from '@stock-bot/types';
import { fetch } from '@stock-bot/utils';
import type { Collection } from 'mongodb';
// Handler registry is now injected, not imported
import { createJobHandler } from '../utils/create-job-handler';
@ -60,7 +60,7 @@ export abstract class BaseHandler implements IHandler {
const constructor = this.constructor as any;
this.handlerName =
constructor.__handlerName || handlerName || this.constructor.name.toLowerCase();
// Flatten all services onto the handler instance
this.logger = getLogger(this.constructor.name);
this.cache = services.cache;
@ -71,7 +71,7 @@ export abstract class BaseHandler implements IHandler {
this.mongodb = services.mongodb;
this.postgres = services.postgres;
this.questdb = services.questdb;
// Get the specific queue for this handler
if (this.queueManager) {
this.queue = this.queueManager.getQueue(this.handlerName);
@ -336,9 +336,9 @@ export abstract class BaseHandler implements IHandler {
static extractMetadata(): HandlerMetadata | null {
const constructor = this as any;
const handlerName = constructor.__handlerName;
if (!handlerName){
if (!handlerName) {
return null;
}
}
const operations = constructor.__operations || [];
const schedules = constructor.__schedules || [];