hydra 0.16.3 → 0.16.4
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/hydra.gemspec +1 -1
- data/lib/hydra/safe_fork.rb +2 -2
- metadata +2 -2
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.16.
|
1
|
+
0.16.4
|
data/hydra.gemspec
CHANGED
data/lib/hydra/safe_fork.rb
CHANGED
@@ -8,7 +8,7 @@ class SafeFork
|
|
8
8
|
begin
|
9
9
|
# create a new connection and perform the action
|
10
10
|
begin
|
11
|
-
ActiveRecord::Base.establish_connection(connection.merge({:allow_concurrency => true})) if defined?(ActiveRecord)
|
11
|
+
ActiveRecord::Base.establish_connection((connection || {}).merge({:allow_concurrency => true})) if defined?(ActiveRecord)
|
12
12
|
rescue ActiveRecord::AdapterNotSpecified
|
13
13
|
# AR was defined but we didn't have a connection
|
14
14
|
end
|
@@ -21,7 +21,7 @@ class SafeFork
|
|
21
21
|
ensure
|
22
22
|
# make sure we re-establish the connection before returning to the main instance
|
23
23
|
begin
|
24
|
-
ActiveRecord::Base.establish_connection(connection.merge({:allow_concurrency => true})) if defined?(ActiveRecord)
|
24
|
+
ActiveRecord::Base.establish_connection((connection || {}).merge({:allow_concurrency => true})) if defined?(ActiveRecord)
|
25
25
|
rescue ActiveRecord::AdapterNotSpecified
|
26
26
|
# AR was defined but we didn't have a connection
|
27
27
|
end
|