This commit is contained in:
2025-11-07 13:34:32 -08:00
commit 1e8c5a972b
436 changed files with 11000 additions and 0 deletions

View File

@@ -0,0 +1,17 @@
module SQLite3Configuration
private
def configure_connection
super
if @config[:retries]
retries = self.class.type_cast_config_to_integer(@config[:retries])
raw_connection.busy_handler do |count|
(count <= retries).tap { |result| sleep count * 0.001 if result }
end
end
end
end
ActiveSupport.on_load :active_record do
ActiveRecord::ConnectionAdapters::SQLite3Adapter.prepend SQLite3Configuration
end