mirror of
https://github.com/basecamp/once-campfire.git
synced 2026-10-10 00:30:13 +09:00
Merge #339: checkpoint SQLite WAL outside request threads
This commit is contained in:
@@ -4,9 +4,13 @@ end
|
||||
|
||||
task "resque:pool:setup" do
|
||||
ActiveRecord::Base.connection.disconnect!
|
||||
# Initializer may have started a contender in the pool master; drop it before
|
||||
# workers fork so they do not inherit the flock.
|
||||
SqliteWalCheckpoint.stop
|
||||
|
||||
Resque::Pool.after_prefork do |job|
|
||||
ActiveRecord::Base.establish_connection
|
||||
Resque.redis.client.close
|
||||
SqliteWalCheckpoint.start
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user