class Gladys::Database

def self.connect(url, threads: 1, preconnect: true)

database as possible.
We don't want to bottleneck gladys and should put as much work on the
Open at least 8 connections to the database for performance reasons.
def self.connect(url, threads: 1, preconnect: true)
  connections = [(threads || 1) + RESERVED_CONNECTIONS, 8].max
  database = Sequel.connect(url, max_connections: connections, preconnect: preconnect)
  database.extension(:pagination)
  database.extension(:pgvector)
  database
end