mongolly 0.3.1 → 0.3.2
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/mongolly/extensions/mongo/mongo_client.rb +4 -2
- data/lib/mongolly/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 0abe98091b5062bff7011a50781dfb5bda52e1af43dcd59cb29e636e6207c51c
|
|
4
|
+
data.tar.gz: c0e51721e6a635dddd021571dc957352d876c20e0ae80285a1f7a33d63a253ab
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 9b08095ed01a2f14d1faf7106947c1f20bfec5e48a0c43f8742af5988361c3ddef8af8dbd83c49eb635df12c487a273e52bdd45ccc69b4795887e029f028af25
|
|
7
|
+
data.tar.gz: 61cd6485e435746e4fafea5ac4632b3eee7540a76e8c6c48b5dd6c9dd5fd675f8d9520d5ae9cf499cd0668114dbf1addf3140627ca5939d8cedc73498dd1c605
|
|
@@ -88,7 +88,9 @@ class Mongo::MongoClient
|
|
|
88
88
|
end
|
|
89
89
|
|
|
90
90
|
def with_disabled_balancing
|
|
91
|
-
|
|
91
|
+
balancer_disabled = self["config"].collection("settings").find_one(_id: "balancer")["stopped"]
|
|
92
|
+
|
|
93
|
+
disable_balancing unless balancer_disabled
|
|
92
94
|
term_time = Time.now.utc + MAX_DISABLE_BALANCER_WAIT
|
|
93
95
|
while !@mongolly_dry_run && (Time.now.utc < term_time) && balancer_active?
|
|
94
96
|
@mongolly_logger.info "Balancer active, sleeping for 10s (#{(term_time - Time.now.utc).round}s remaining)"
|
|
@@ -100,7 +102,7 @@ class Mongo::MongoClient
|
|
|
100
102
|
@mongolly_logger.debug "With shard balancing disabled..."
|
|
101
103
|
yield
|
|
102
104
|
ensure
|
|
103
|
-
enable_balancing
|
|
105
|
+
enable_balancing unless balancer_disabled
|
|
104
106
|
end
|
|
105
107
|
|
|
106
108
|
def with_database_locked
|
data/lib/mongolly/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: mongolly
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.3.
|
|
4
|
+
version: 0.3.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Michael Saffitz
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2018-
|
|
11
|
+
date: 2018-10-29 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: thor
|