Refresh HiveGrid Cloud reference snapshot

This commit is contained in:
david committed 2026-08-03 15:31:14 +02:00
1 parent 5e99e14772
commit 7f88026f79
5955 files changed
+1177325 -188362

No files matched your search

@@ -3,6 +3,11 @@ import { subscribeSubscriptionCache } from "./utils/services/.server/subscriptio
import { subscribeTenantCache } from "./utils/db/tenant-cache.server";
import { subscribeFeatureFlagCache } from "./utils/services/.server/featureFlagCache.server";
import { wireTenantPlanLookup } from "./utils/services/.server/tenantPlanLookup.server";
import { getSharedStore } from "./shared-store.server";
import { subscribePermissionCache } from "./utils/db/permissions/permission-cache.server";
import { subscribeApiKeyAuthCache } from "./utils/api/api-key-auth-cache.server";
import { subscribeUserSnapshotCache } from "./utils/db/user-snapshot-cache.server";
import { subscribeAppConfigurationCache } from "./utils/db/app-configuration-cache.server";
const log = createScopedLogger("cache-bootstrap");
let started = false;
@@ -25,6 +30,10 @@ function pubsubEnabled(): boolean {
*/
export function startCacheSubscribers(): void {
if (started) return;
// Resolve the backing store synchronously at boot. Production must never
// continue with replica-local cache and rate-limit state when Redis is
// missing; asynchronous subscriber errors would otherwise be swallowed.
getSharedStore();
started = true;
// Wire the BullMQ tenant-plan lookup unconditionally — it reads from the
// subscription cache which still serves locally when pub/sub is off.
@@ -32,7 +41,7 @@ export function startCacheSubscribers(): void {
if (!pubsubEnabled()) {
log.warn(
{ component: "cache-bootstrap" },
"CACHE_INVALIDATION_ENABLED=false — pub/sub subscribers will not start (L1 TTL is the only consistency mechanism)",
"CACHE_INVALIDATION_ENABLED=false — pub/sub subscribers will not start (L1 TTL is the only consistency mechanism)"
);
return;
}
@@ -46,6 +55,18 @@ export function startCacheSubscribers(): void {
subscribeFeatureFlagCache().catch((err: unknown) => {
log.error({ err }, "feature-flag cache subscriber failed to start");
}),
subscribePermissionCache().catch((err: unknown) => {
log.error({ err }, "permission cache subscriber failed to start");
}),
subscribeApiKeyAuthCache().catch((err: unknown) => {
log.error({ err }, "API-key authorization cache subscriber failed to start");
}),
subscribeUserSnapshotCache().catch((err: unknown) => {
log.error({ err }, "user snapshot cache subscriber failed to start");
}),
subscribeAppConfigurationCache().catch((err: unknown) => {
log.error({ err }, "app configuration cache subscriber failed to start");
}),
]).then(() => {
log.info({ component: "cache-bootstrap" }, "cache subscribers started");
});