Merge pull request #1151 from useautumn/fix/dryrun-autotopups
fix: dryrun autotopups
This commit is contained in:
@@ -63,6 +63,14 @@ export const autoTopup = async ({
|
||||
billingContext: autoTopupContext,
|
||||
});
|
||||
|
||||
if (org.config.dryrun_autotopups) {
|
||||
logger.info(
|
||||
`[autoTopup] Dry run enabled, skipping recordAutoTopupAttempt`,
|
||||
{ extras: ctx.extraLogs },
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
||||
let billingResult: Awaited<ReturnType<typeof executeBillingPlan>>;
|
||||
billingResult = await executeBillingPlan({
|
||||
ctx,
|
||||
|
||||
@@ -32,6 +32,7 @@ export const OrgConfigSchema = z.object({
|
||||
disable_stripe_writes: z.boolean().default(false),
|
||||
|
||||
disabled_auto_topup: z.boolean().default(false),
|
||||
dryrun_autotopups: z.boolean().default(false),
|
||||
});
|
||||
|
||||
export type OrgConfig = z.infer<typeof OrgConfigSchema>;
|
||||
|
||||
Reference in New Issue
Block a user