Fas 2 steg 3: Household Trust Score (admin + i18n status i appen)
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { and, eq, gt, inArray, isNull, lte, sql } from "drizzle-orm";
|
||||
import { and, asc, eq, gt, inArray, isNull, lte, sql } from "drizzle-orm";
|
||||
import { schema } from "@app/database";
|
||||
import { classifyExpiry, computeTrust } from "@app/inventory-engine";
|
||||
import { deriveMemoryUpdates } from "@app/memory-client";
|
||||
@@ -57,6 +57,7 @@ export async function processTrustDecay(ctx: WorkerContext): Promise<number> {
|
||||
.select()
|
||||
.from(schema.inventoryItems)
|
||||
.where(and(isNull(schema.inventoryItems.depletedAt), gt(schema.inventoryItems.quantity, 0)))
|
||||
.orderBy(asc(schema.inventoryItems.updatedAt))
|
||||
.limit(500);
|
||||
|
||||
let updated = 0;
|
||||
|
||||
Reference in New Issue
Block a user