* feat: monthly-proration-taskerh * remove cronjob from tasker implementation * feat: add DI for MonthlyProrationService and TriggerDevLoggerServiceModule - Create TriggerDevLoggerServiceModule for DI injection of TriggerDevLogger - Add tokens for TriggerDevLogger in shared.tokens.ts - Create MonthlyProrationService DI module and container - Update processMonthlyProrationBatch.ts to use DI container - Use redactError in Tasker.ts to avoid logging sensitive information Co-Authored-By: sean@cal.com <Sean@brydon.io> --------- Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
24 lines
894 B
TypeScript
24 lines
894 B
TypeScript
import { bindModuleToClassOnToken, createModule, type ModuleLoader } from "@calcom/features/di/di";
|
|
import { moduleLoader as loggerServiceModule } from "@calcom/features/di/shared/services/logger.service";
|
|
import { MonthlyProrationTriggerDevTasker } from "@calcom/features/ee/billing/service/proration/tasker/MonthlyProrationTriggerDevTasker";
|
|
|
|
import { MONTHLY_PRORATION_TASKER_DI_TOKENS } from "./tokens";
|
|
|
|
const thisModule = createModule();
|
|
const token = MONTHLY_PRORATION_TASKER_DI_TOKENS.MONTHLY_PRORATION_TRIGGER_TASKER;
|
|
const moduleToken = MONTHLY_PRORATION_TASKER_DI_TOKENS.MONTHLY_PRORATION_TRIGGER_TASKER_MODULE;
|
|
const loadModule = bindModuleToClassOnToken({
|
|
module: thisModule,
|
|
moduleToken,
|
|
token,
|
|
classs: MonthlyProrationTriggerDevTasker,
|
|
depsMap: {
|
|
logger: loggerServiceModule,
|
|
},
|
|
});
|
|
|
|
export const moduleLoader = {
|
|
token,
|
|
loadModule,
|
|
} satisfies ModuleLoader;
|