switchman 1.2.11 → 1.2.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/switchman/active_record/connection_pool.rb +0 -3
- data/lib/switchman/version.rb +1 -1
- data/lib/tasks/switchman.rake +2 -0
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: c2e8747b77d09d38c1f00f984c7e85d6560515b3
|
|
4
|
+
data.tar.gz: d9bfe61f3a1a7a0a22a1cb5cbffa33ef751b3b7e
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 05bf84c6e45ed9530202a4f5ce6ba058326cbd7fae15c8ab3d8c4c5d50328d93df41e9027e61b4591856d2452537f82b96de589460a8ac4e43d8916a0cb9d2fc
|
|
7
|
+
data.tar.gz: 6bcab454b76a9c373708222463414959c4a14c08946d94c1aa7c1d4a9d8e72f5027ae1fdc7ea86fad20b15f3bdf0f35e7cf5266023d97c82516ec03600b6c381
|
|
@@ -24,9 +24,6 @@ module Switchman
|
|
|
24
24
|
def checkout_new_connection_with_sharding
|
|
25
25
|
# TODO: this might be a threading issue
|
|
26
26
|
spec.config[:shard_name] = self.shard.name
|
|
27
|
-
if self.shard.database_server.id == ::Rails.env
|
|
28
|
-
::ActiveRecord::Base.configurations[::Rails.env] = spec.config.stringify_keys
|
|
29
|
-
end
|
|
30
27
|
|
|
31
28
|
conn = checkout_new_connection_without_sharding
|
|
32
29
|
conn.shard = self.shard
|
data/lib/switchman/version.rb
CHANGED
data/lib/tasks/switchman.rake
CHANGED
|
@@ -64,6 +64,8 @@ module Switchman
|
|
|
64
64
|
Shard.with_each_shard(shards, Shard.categories, :parallel => ENV['PARALLEL'].to_i) do
|
|
65
65
|
shard = Shard.current
|
|
66
66
|
puts "#{shard.id}: #{shard.description}"
|
|
67
|
+
::ActiveRecord::Base.connection_pool.spec.config[:shard_name] = Shard.current.name
|
|
68
|
+
::ActiveRecord::Base.configurations[::Rails.env] = ::ActiveRecord::Base.connection_pool.spec.config.stringify_keys
|
|
67
69
|
shard.database_server.unshackle do
|
|
68
70
|
old_actions.each(&:call)
|
|
69
71
|
end
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: switchman
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.2.
|
|
4
|
+
version: 1.2.12
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Cody Cutrer
|
|
@@ -10,7 +10,7 @@ authors:
|
|
|
10
10
|
autorequire:
|
|
11
11
|
bindir: bin
|
|
12
12
|
cert_chain: []
|
|
13
|
-
date: 2014-07-
|
|
13
|
+
date: 2014-07-28 00:00:00.000000000 Z
|
|
14
14
|
dependencies:
|
|
15
15
|
- !ruby/object:Gem::Dependency
|
|
16
16
|
name: railties
|