removed old working on ceo handler

This commit is contained in:
Boki 2025-06-22 13:26:29 -04:00
parent acf66dbfb6
commit 5009ccbeda
8 changed files with 243 additions and 213 deletions

View file

@ -90,12 +90,6 @@ export abstract class BaseHandler implements IHandler {
await queue.add(operation, jobData, { delay });
}
/**
* Helper method to schedule an operation with delay in seconds
*/
async scheduleIn(operation: string, payload: unknown, delaySeconds: number): Promise<void> {
return this.scheduleOperation(operation, payload, delaySeconds * 1000);
}
/**
* Create execution context for operations
@ -118,11 +112,11 @@ export abstract class BaseHandler implements IHandler {
/**
* Get a MongoDB collection with type safety
*/
protected collection<T = any>(name: string): Collection<T> {
protected collection<T extends {} = any>(name: string): Collection<T> {
if (!this.mongodb) {
throw new Error('MongoDB service is not available');
}
return this.mongodb.collection<T>(name);
return this.mongodb.collection(name);
}
/**
@ -142,7 +136,7 @@ export abstract class BaseHandler implements IHandler {
if (!this.cache) {
return null;
}
return this.cache.get<T>(`${this.handlerName}:${key}`);
return this.cache.get(`${this.handlerName}:${key}`);
}
/**