PostgresStoreConfig

class PostgresStoreConfig(val schema: String? = null, val dispatcher: CoroutineDispatcher = Dispatchers.IO, val autoMigrate: Boolean = true)

Tuning for PostgresJobStore. Everything has a production-sane default.

schema names the Postgres schema holding Klokka's tables; null uses the connection's default search_path. When set, the store creates it if missing and pins search_path on every borrowed connection. Must be a plain identifier (letters, digits, underscore).

dispatcher is where every blocking JDBC call runs; the caller's coroutine is never blocked on a connection. Size it alongside the DataSource pool.

autoMigrate applies the bundled schema migrations lazily before the first statement. Set false when migrations are operated externally (Flyway against the bundled resource directory, or a DBA-run script) and call PostgresJobStore.migrate yourself if needed.

Constructors

Link copied to clipboard
constructor(schema: String? = null, dispatcher: CoroutineDispatcher = Dispatchers.IO, autoMigrate: Boolean = true)

Properties

Link copied to clipboard
Link copied to clipboard
val dispatcher: CoroutineDispatcher
Link copied to clipboard