mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-11 13:52:20 +00:00
chore: format sharing authority controls
Apply repository formatting to provider and import coverage.
This commit is contained in:
1 parent
a620a730b9
commit
f5ca810643
4 files changed
+21
-18
No files matched your search
@@ -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 },
|
||||
|
||||
@@ -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>();
|
||||
|
||||
|
||||
Reference in new issue
Block a user