mongolly 0.2.2 → 0.2.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -6,7 +6,7 @@ require 'retries'
6
6
  require 'debugger'
7
7
 
8
8
  class Mongo::MongoClient
9
- MAX_DISABLE_BALANCER_WAIT = 60*5 # 5 Minutes
9
+ MAX_DISABLE_BALANCER_WAIT = 60*8 # 8 Minutes
10
10
  REPLICA_SNAPSHOT_THRESHOLD = 60*5 # 5 Minutes
11
11
 
12
12
  def snapshot_ebs(options={})
@@ -92,7 +92,7 @@ protected
92
92
  end
93
93
 
94
94
  def balancer_active?
95
- self['config'].collection('locks').find({_id: 'balancer'}).count > 1
95
+ self['config'].collection('locks').find({_id: 'balancer', state: {'$ne' => 0}}).count > 0
96
96
  end
97
97
 
98
98
  def config_server
@@ -112,7 +112,7 @@ protected
112
112
  sleep 10
113
113
  end
114
114
  if !@mongolly_dry_run && balancer_active?
115
- raise RuntimeError.new "unable to disable balancer within #{MAX_DISABLE_BALANCER_WAIT}s"
115
+ raise RuntimeError.new "Unable to disable balancer within #{MAX_DISABLE_BALANCER_WAIT}s"
116
116
  end
117
117
  @mongolly_logger.debug "With shard balancing disabled..."
118
118
  yield
@@ -1,3 +1,3 @@
1
1
  module Mongolly
2
- VERSION = "0.2.2"
2
+ VERSION = "0.2.3"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mongolly
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.2
4
+ version: 0.2.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-05-31 00:00:00.000000000 Z
12
+ date: 2013-06-02 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: thor