Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions pm-stack/aggregator/src/sources/live.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ import {
import { mergeChargeRows } from "../charges-collect.ts";
import type { CloudflareExportDoc } from "../saas-extract.ts";
import { poolItemToGhItem } from "../projects.ts";
import { createNeedsDrewSweeper, needsDrewSweepTtlMs, type NeedsDrewCensus } from "../needs-drew.ts";
import { createNeedsUserSweeper, needsUserSweepTtlMs, type NeedsUserCensus } from "../needs-drew.ts";
import { INITIAL_STANDING_AUTO, sanitizeTierItemExtensions, withUserFallbacks } from "../tier-items.ts";
import { assembleWorkItems } from "../work-items.ts";
import {
Expand Down Expand Up @@ -974,7 +974,7 @@ export function liveSource(
// sweeper caches for 5 minutes and shares one in-flight sweep between
// concurrent callers, so the three attention fragments rendering
// together do not each pay that cost (#3970).
const needsDrewSweep = createNeedsDrewSweeper(
const needsUserSweep = createNeedsUserSweeper(
(url) => {
const token = process.env.PM_AGG_GITHUB_TOKEN ?? process.env.GITHUB_TOKEN;
const headers: Record<string, string> = {
Expand All @@ -985,8 +985,8 @@ export function liveSource(
return getJson(url, headers);
},
{},
// Half as often with no token: see needsDrewSweepTtlMs.
{ ttlMs: needsDrewSweepTtlMs(Boolean(process.env.PM_AGG_GITHUB_TOKEN ?? process.env.GITHUB_TOKEN)) },
// Half as often with no token: see needsUserSweepTtlMs.
{ ttlMs: needsUserSweepTtlMs(Boolean(process.env.PM_AGG_GITHUB_TOKEN ?? process.env.GITHUB_TOKEN)) },
);
// #9922: the Path to Phase 12 body feed — one GraphQL read of
// #1235's body, cached for 5 minutes and shared in-flight (same
Expand Down Expand Up @@ -1667,8 +1667,8 @@ export function liveSource(
const feed = await getFeed();
return projectAuditFromFeed(feed);
},
async needsDrew(): Promise<NeedsDrewCensus | null> {
return needsDrewSweep();
async needsDrew(): Promise<NeedsUserCensus | null> {
return needsUserSweep();
},
async phase12(): Promise<Phase12Snapshot | null> {
return phase12Snapshot();
Expand Down