feat(WHE-22): ingest configured topic messages with idempotent persistence

This commit is contained in:
2026-03-05 04:32:58 +04:00
parent e72c145e3d
commit 67e9e2dee2
16 changed files with 1838 additions and 20 deletions

View File

@@ -1,7 +1,5 @@
import { and, eq } from 'drizzle-orm'
import { drizzle } from 'drizzle-orm/postgres-js'
import postgres from 'postgres'
import { createDbClient } from './client'
import {
billingCycles,
households,
@@ -20,13 +18,11 @@ if (!databaseUrl) {
throw new Error('DATABASE_URL is required for db seed')
}
const queryClient = postgres(databaseUrl, {
prepare: false,
max: 2
const { db, queryClient } = createDbClient(databaseUrl, {
max: 2,
prepare: false
})
const db = drizzle(queryClient)
const FIXTURE_IDS = {
household: '11111111-1111-4111-8111-111111111111',
cycle: '22222222-2222-4222-8222-222222222222',