Skip to content

Commit 870f026

Browse files
committed
chore: clean up publisher abuse autoban diff
1 parent 59bb53d commit 870f026

9 files changed

Lines changed: 353 additions & 1076 deletions

File tree

convex/crons.test.ts

Lines changed: 13 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -136,20 +136,19 @@ describe("crons", () => {
136136
);
137137
});
138138

139-
it("runs publisher abuse scoring weekly", async () => {
139+
it("registers publisher abuse cron jobs", async () => {
140140
await import("./crons");
141141

142142
expect(mocks.interval).toHaveBeenCalledWith(
143143
"publisher-abuse-score-refresh",
144144
{ hours: 168 },
145145
mocks.publisherAbuseScoreRefreshRef,
146-
{ batchSize: 250, maxPages: 5, trigger: "cron" },
146+
{
147+
batchSize: 250,
148+
maxPages: 5,
149+
trigger: "cron",
150+
},
147151
);
148-
});
149-
150-
it("runs publisher temporal abuse scanning weekly", async () => {
151-
await import("./crons");
152-
153152
expect(mocks.interval).toHaveBeenCalledWith(
154153
"publisher-temporal-abuse-scan",
155154
{ hours: 168 },
@@ -163,27 +162,22 @@ describe("crons", () => {
163162
trigger: "cron",
164163
},
165164
);
166-
});
167-
168-
it("runs publisher abuse autobans in one-account mutation pages", async () => {
169-
await import("./crons");
170-
171165
expect(mocks.interval).toHaveBeenCalledWith(
172166
"publisher-abuse-autobans",
173167
{ hours: 24 },
174168
mocks.publisherAbuseAutobanRef,
175-
{ batchSize: 1, maxPages: 50 },
169+
{
170+
batchSize: 1,
171+
maxPages: 50,
172+
},
176173
);
177-
});
178-
179-
it("prunes stale publisher temporal scan candidates daily", async () => {
180-
await import("./crons");
181-
182174
expect(mocks.interval).toHaveBeenCalledWith(
183175
"publisher-temporal-scan-candidate-prune",
184176
{ hours: 24 },
185177
mocks.publisherTemporalScanCandidatePruneRef,
186-
{ batchSize: 500 },
178+
{
179+
batchSize: 500,
180+
},
187181
);
188182
});
189183

0 commit comments

Comments
 (0)