Closed lazaronixon closed 9 months ago
Fixed =)
require "logger"
LOGGER = Logger.new($stdout)
LOGGER.level = ENV.fetch("RODA_LOG_LEVEL", "info")
database_url = ENV.fetch("DATABASE_URL") { "extralite://storage/development.sqlite" }
after_connect = proc do |db|
db.busy_timeout = 5
end
require "sequel/core"
DB = Sequel.connect(database_url, logger: LOGGER, after_connect: after_connect)
DB.transaction_mode = :immediate
I'm having many Extralite::BusyError, how to set
busy_timeout
or even better, implement abusy_handler
with a retry policy? I'm using the sequel adapter and the propertybusy_timeout
is not available.https://github.com/digital-fabric/extralite/blob/33d3e754233a53675e4b952a49184b5f8a37a216/lib/sequel/adapters/extralite.rb#L123
With sqlite3 I could do something like this: