Skip to content

armgit / dub

Public Imported from GitHub
0

The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.

Load the release code after the env in the hold release script

Rafifdde50b81c47
diff --git a/apps/web/scripts/migrations/release-merged-hold-commissions.ts b/apps/web/scripts/migrations/release-merged-hold-commissions.ts
index cf0c31e259..e3f6829158 100644
--- a/apps/web/scripts/migrations/release-merged-hold-commissions.ts
+++ b/apps/web/scripts/migrations/release-merged-hold-commissions.ts
@@ -1,4 +1,3 @@
-import { releaseHoldCommissions } from "@/lib/api/fraud/release-hold-commissions";
import { prisma } from "@/lib/prisma";
import {
CommissionStatus,
@@ -110,6 +109,12 @@ async function main() {
return;
}
+ // Import after dotenv-flow loads the env. The QStash clients read the token
+ // when their module loads, and the release triggers QStash jobs.
+ const { releaseHoldCommissions } = await import(
+ "@/lib/api/fraud/release-hold-commissions"
+ );
+
let totalReleased = 0;
for (const { programId, partnerId } of holdCommissions) {