einhorn 0.7.1 → 0.7.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/.travis.yml +6 -4
- data/lib/einhorn/command.rb +7 -0
- data/lib/einhorn/command/interface.rb +3 -3
- data/lib/einhorn/version.rb +1 -1
- 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: 9ad5953d5d76feb2ece4284c0c69db2ab3aa42d6
|
4
|
+
data.tar.gz: a9e7290ffcf43ba56b5987bb51a3a45a94e18d84
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9170d915de608cc8b467c474cbafaafbf4d0dbcac6103d446a67f3897a0c119247a213f84858b344a7c8ce2fa251be8e4370880bf35fbe92808831192c6191e1
|
7
|
+
data.tar.gz: 92d76cdf34932a638be91c330219658570113b07bfeb76fe24291d74d6c374ee6b19939a9c120138ccc958f0af921ac6f99fa833211e7614dfd1df71c164f890
|
data/.travis.yml
CHANGED
@@ -1,8 +1,10 @@
|
|
1
1
|
language: ruby
|
2
2
|
rvm:
|
3
|
-
- 1.8.7
|
4
|
-
- 1.9.2
|
5
|
-
- 1.9.3
|
6
3
|
- 2.0.0
|
7
4
|
- 2.1
|
8
|
-
-
|
5
|
+
- 2.2
|
6
|
+
|
7
|
+
# This is to work around the version of bundler installed in Travis and
|
8
|
+
# https://github.com/bundler/bundler/issues/3558
|
9
|
+
before_install:
|
10
|
+
- gem update bundler
|
data/lib/einhorn/command.rb
CHANGED
@@ -478,6 +478,12 @@ module Einhorn
|
|
478
478
|
missing.times {spinup}
|
479
479
|
end
|
480
480
|
|
481
|
+
# Unbounded exponential backoff is not a thing: we run into problems if
|
482
|
+
# e.g., each of our hundred workers simultaneously fail to boot for the same
|
483
|
+
# ephemeral reason. Instead cap backoff by some reasonable maximum, so we
|
484
|
+
# don't wait until the heat death of the universe to spin up new capacity.
|
485
|
+
MAX_SPINUP_INTERVAL = 30.0
|
486
|
+
|
481
487
|
def self.replenish_gradually(max_unacked=nil)
|
482
488
|
return if Einhorn::TransientState.has_outstanding_spinup_timer
|
483
489
|
return unless Einhorn::WorkerPool.missing_worker_count > 0
|
@@ -500,6 +506,7 @@ module Einhorn
|
|
500
506
|
# Exponentially backoff automated spinup if we're just having
|
501
507
|
# things die before ACKing
|
502
508
|
spinup_interval = Einhorn::State.config[:seconds] * (1.5 ** Einhorn::State.consecutive_deaths_before_ack)
|
509
|
+
spinup_interval = [spinup_interval, MAX_SPINUP_INTERVAL].min
|
503
510
|
seconds_ago = (Time.now - Einhorn::State.last_spinup).to_f
|
504
511
|
|
505
512
|
if seconds_ago > spinup_interval
|
@@ -335,9 +335,9 @@ EOF
|
|
335
335
|
end
|
336
336
|
|
337
337
|
count = args[0].to_i
|
338
|
-
if count < 1 || count >
|
339
|
-
# sancheck.
|
340
|
-
next "Invalid count: '#{args[0]}'. Must be an integer in [1,
|
338
|
+
if count < 1 || count > 1000
|
339
|
+
# sancheck. 1000 is kinda arbitrary.
|
340
|
+
next "Invalid count: '#{args[0]}'. Must be an integer in [1,1000)."
|
341
341
|
end
|
342
342
|
|
343
343
|
Einhorn::Command.set_workers(count)
|
data/lib/einhorn/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: einhorn
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.7.
|
4
|
+
version: 0.7.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Greg Brockman
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2016-06-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|