mirror of
https://github.com/whekin/household-bot.git
synced 2026-04-01 04:34:04 +00:00
feat(WHE-22): ingest configured topic messages with idempotent persistence
This commit is contained in:
@@ -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',
|
||||
|
||||
Reference in New Issue
Block a user