lib/tork/config/rails/worker.rb in tork-19.1.0 vs lib/tork/config/rails/worker.rb in tork-19.2.0
- old
+ new
@@ -12,10 +12,8 @@
else
warn "#{$0}: config/rails/worker: couldn't read connection information"
{}
end
- # in-memory databases are an exception; they are simply fork()ed along
- if info[:database] != ':memory:'
- base.connection.reconnect!
- end
+ # in-memory databases are private to each process so they're safely fork()ed
+ base.connection.reconnect! unless info[:database] == ':memory:'
end