autoscale 0.9.3 → 0.11.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +11 -2
- data/README.md +19 -13
- data/examples/complex.rb +3 -3
- data/examples/simple.rb +2 -2
- data/lib/autoscaler/binary_scaling_strategy.rb +1 -1
- data/lib/autoscaler/heroku_platform_scaler.rb +84 -0
- data/lib/autoscaler/ignore_scheduled_and_retrying.rb +5 -0
- data/lib/autoscaler/linear_scaling_strategy.rb +1 -1
- data/lib/autoscaler/sidekiq.rb +2 -2
- data/lib/autoscaler/sidekiq/client.rb +1 -1
- data/lib/autoscaler/sidekiq/entire_queue_system.rb +10 -0
- data/lib/autoscaler/sidekiq/sleep_wait_server.rb +2 -2
- data/lib/autoscaler/sidekiq/specified_queue_system.rb +10 -0
- data/lib/autoscaler/sidekiq/thread_server.rb +90 -0
- data/lib/autoscaler/version.rb +1 -1
- data/spec/autoscaler/binary_scaling_strategy_spec.rb +2 -2
- data/spec/autoscaler/counter_cache_memory_spec.rb +3 -3
- data/spec/autoscaler/counter_cache_redis_spec.rb +6 -6
- data/spec/autoscaler/delayed_shutdown_spec.rb +4 -4
- data/spec/autoscaler/heroku_platform_scaler_spec.rb +47 -0
- data/spec/autoscaler/heroku_scaler_spec.rb +8 -8
- data/spec/autoscaler/ignore_scheduled_and_retrying_spec.rb +4 -4
- data/spec/autoscaler/linear_scaling_strategy_spec.rb +13 -13
- data/spec/autoscaler/sidekiq/activity_spec.rb +4 -4
- data/spec/autoscaler/sidekiq/client_spec.rb +5 -5
- data/spec/autoscaler/sidekiq/entire_queue_system_spec.rb +11 -11
- data/spec/autoscaler/sidekiq/sleep_wait_server_spec.rb +21 -21
- data/spec/autoscaler/sidekiq/specified_queue_system_spec.rb +10 -10
- data/spec/autoscaler/sidekiq/thread_server_spec.rb +44 -0
- data/spec/spec_helper.rb +4 -2
- data/spec/test_system.rb +6 -0
- metadata +71 -15
- data/lib/autoscaler/sidekiq/celluloid_monitor.rb +0 -68
- data/lib/autoscaler/sidekiq/monitor_middleware_adapter.rb +0 -46
- data/spec/autoscaler/sidekiq/celluloid_monitor_spec.rb +0 -39
- data/spec/autoscaler/sidekiq/monitor_middleware_adapter_spec.rb +0 -16
@@ -1,16 +0,0 @@
|
|
1
|
-
require 'spec_helper'
|
2
|
-
require 'autoscaler/sidekiq/monitor_middleware_adapter'
|
3
|
-
|
4
|
-
describe Autoscaler::Sidekiq::MonitorMiddlewareAdapter do
|
5
|
-
before do
|
6
|
-
@redis = Sidekiq.redis = REDIS
|
7
|
-
Sidekiq.redis {|c| c.flushdb }
|
8
|
-
end
|
9
|
-
|
10
|
-
let(:cut) {Autoscaler::Sidekiq::MonitorMiddlewareAdapter}
|
11
|
-
let(:scaler) {TestScaler.new(1)}
|
12
|
-
let(:server) {cut.new(scaler, 0, ['queue'])}
|
13
|
-
|
14
|
-
it('yields') {server.call(Object.new, {}, 'queue') {:foo}.should == :foo}
|
15
|
-
it('yields with a redis pool') {server.call(Object.new, {}, 'queue', Sidekiq.method(:redis)) {:foo}.should == :foo}
|
16
|
-
end
|