mirror of
https://github.com/basecamp/once-campfire.git
synced 2026-10-10 00:30:13 +09:00
8704baa860
Keep the module under lib/rails_ext, use before_worker_boot, shorten the SQLite busy timeout under stop's join, and PASSIVE-checkpoint on exit for short-lived writers. Co-authored-by: Thomas Klemm <github@tklemm.eu>
9 lines
360 B
Ruby
9 lines
360 B
Ruby
# Loaded from lib/rails_ext (autoload_lib ignore list) so reloads do not orphan
|
|
# the contender thread. Non-test processes start here; Puma/Resque stop before
|
|
# fork and start again in the child.
|
|
require Rails.root.join("lib/rails_ext/sqlite_wal_checkpoint")
|
|
|
|
Rails.application.config.after_initialize do
|
|
SqliteWalCheckpoint.start unless Rails.env.test?
|
|
end
|