Files
archie/internal/app/archied/state_store_task.go
T
sam 368e33a9a5 feat(archied): serve the State Store, event store and Gateway conversations from Postgres
The State Store's task and event-capture stores and the conversation store
read by archied and served by archie-gateway now open on database_url.
Every serving process refuses to start when legacy SQLite data exists and no
import completion is recorded, naming archie-state-store import; a fresh
install records completion itself. The Gateway holds its Postgres serve
claim for its lifetime and releases it before the pool closes.
2026-09-24 10:01:54 +10:00

14 lines
446 B
Go

package archied
import (
"github.com/samcharles93/archie-core/internal/infrastructure/postgres"
)
// openTaskStore serves the task store from the State Store's Postgres pool.
// Serve ownership is the pool's claim (openStateStorePool), so a second State
// Store on the same database already failed before this runs, and the pool's
// cleanup closes what this store reads through.
func (b *boot) openTaskStore() {
b.st = postgres.New(b.pg)
}