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.

Remove the finally and missing program comments.

Rafi17d367505016
diff --git a/apps/web/lib/api/fraud/release-all-hold-commissions.ts b/apps/web/lib/api/fraud/release-all-hold-commissions.ts
index ed58a007e6..c750e1ea60 100644
--- a/apps/web/lib/api/fraud/release-all-hold-commissions.ts
+++ b/apps/web/lib/api/fraud/release-all-hold-commissions.ts
@@ -21,8 +21,6 @@ export async function releaseAllHoldCommissions({
},
});
- // The program can be deleted before this cron runs.
- // Return 0 so that QStash does not retry the job.
if (!program) {
console.log(
`Program ${programId} not found, skipping hold commission release`,
@@ -123,8 +121,6 @@ export async function releaseAllHoldCommissions({
);
}
} finally {
- // Runs even when a later pass throws, so the rows that earlier
- // passes released still get synced and aggregated.
// Each partner is synced once here instead of once per pass.
for (const partnerIds of chunk([...partnerIdsToSync], 100)) {
const results = await Promise.allSettled(
diff --git a/apps/web/lib/api/fraud/release-hold-commissions.ts b/apps/web/lib/api/fraud/release-hold-commissions.ts
index a2216a2f21..163a884a65 100644
--- a/apps/web/lib/api/fraud/release-hold-commissions.ts
+++ b/apps/web/lib/api/fraud/release-hold-commissions.ts
@@ -232,8 +232,6 @@ export async function releaseHoldCommissions({
}
}
} finally {
- // Runs even when a later pass throws, so the rows that earlier
- // passes released still get aggregated
if (totalReleased > 0) {
try {
await triggerAggregateDueCommissionsCronJob(programId);