chore: format sharing authority controls

Apply repository formatting to provider and import coverage.
This commit is contained in:
Marc-André Bombeck committed 2026-08-06 02:05:24 +02:00
1 parent a620a730b9
commit f5ca810643
4 files changed
+21 -18

No files matched your search

+15 -11
View File
@@ -146,17 +146,21 @@ export async function enqueueStatusGeneration(
return;
}
try {
await boss.send(INSIGHT_STATUS_GENERATE_QUEUE, { ...payload, authority }, {
singletonKey: `${payload.userId}:${payload.metric}`,
// De-dupe within a short window so a polling client doesn't enqueue
// a fresh job on every tick while a generation is already running.
singletonSeconds: 120,
// Transient provider / pool failures retry with backoff instead of
// leaving the card on "preparing" until the next nightly cron.
retryLimit: 3,
retryDelay: 60,
retryBackoff: true,
});
await boss.send(
INSIGHT_STATUS_GENERATE_QUEUE,
{ ...payload, authority },
{
singletonKey: `${payload.userId}:${payload.metric}`,
// De-dupe within a short window so a polling client doesn't enqueue
// a fresh job on every tick while a generation is already running.
singletonSeconds: 120,
// Transient provider / pool failures retry with backoff instead of
// leaving the card on "preparing" until the next nightly cron.
retryLimit: 3,
retryDelay: 60,
retryBackoff: true,
},
);
annotate({
action: { name: "insights.status.generate.enqueued" },
meta: { metric: payload.metric },
+1 -4
View File
@@ -18,10 +18,7 @@ export interface ProviderWorkAuthority {
grantId: string | null;
}
export type ProviderCredentialPolicy =
| "personal"
| "operator-default"
| "deny";
export type ProviderCredentialPolicy = "personal" | "operator-default" | "deny";
const workerAuthority = new AsyncLocalStorage<ProviderWorkAuthority>();