refactor: platform billing jobs tasks constants (#27190)

This commit is contained in:
Morgan
2026-01-23 12:54:05 +00:00
committed by GitHub
parent 4115eaacbd
commit b9b7e50f5a
9 changed files with 35 additions and 12 deletions
@@ -1,3 +1,4 @@
import { getIncrementUsageIdempotencyKey, getIncrementUsageJobTag } from "@calcom/platform-libraries/tasker";
import { InjectQueue } from "@nestjs/bull";
import {
BadRequestException,
@@ -453,8 +454,8 @@ export class BillingService implements IBillingService, OnModuleDestroy {
payload: { userId },
options: {
delay: startTime,
tags: [`platform.billing.usage.${uid}`],
idempotencyKey: `platform.billing.usage.${uid}-${userId}`,
tags: [getIncrementUsageJobTag(uid)],
idempotencyKey: getIncrementUsageIdempotencyKey(uid, userId),
},
});
return true;