mirror of
https://github.com/basecamp/once-campfire.git
synced 2026-10-09 16:20:09 +09:00
61631ea5f9
Unify startup: initializer starts every non-test process, Puma and Resque stop before fork and start again in the child. Only the contender thread releases the lock. Drop Puma::CLI / single_puma_process? special cases. Co-authored-by: Thomas Klemm <github@tklemm.eu>
6 lines
260 B
Ruby
6 lines
260 B
Ruby
# Start a checkpoint contender in every non-test process. Puma and Resque pool
|
|
# stop before fork and start again in the child so the flock is never inherited.
|
|
Rails.application.config.after_initialize do
|
|
SqliteWalCheckpoint.start unless Rails.env.test?
|
|
end
|