diff --git a/Pro-Changes.md b/Pro-Changes.md index e4eb2f6e..0ff73314 100644 --- a/Pro-Changes.md +++ b/Pro-Changes.md @@ -3,7 +3,7 @@ Sidekiq Pro Changelog Please see [http://sidekiq.org/](http://sidekiq.org/) for more details and how to buy. -HEAD +2.1.0 ----------- - Explicit support for sharding batches. You list your Redis shards and diff --git a/bin/sidekiqload b/bin/sidekiqload index ad755022..9aad713b 100755 --- a/bin/sidekiqload +++ b/bin/sidekiqload @@ -31,7 +31,6 @@ Sidekiq.configure_server do |config| config.logger.level = Logger::ERROR config.average_scheduled_poll_interval = 2 end -Sidekiq.redis {|c| c.flushdb} class LoadWorker include Sidekiq::Worker @@ -45,6 +44,18 @@ class LoadWorker end end +# brew tap shopify/shopify +# brew install toxiproxy +# gem install toxiproxy +require 'toxiproxy' +# simulate a non-localhost network for realer-world conditions. +# adding 1ms of network latency has an ENORMOUS impact on benchmarks +Toxiproxy.populate([{ + "name": "redis", + "listen": "127.0.0.1:6380", + "upstream": "127.0.0.1:6379" +}]) + self_read, self_write = IO.pipe %w(INT TERM USR1 USR2 TTIN).each do |sig| begin @@ -56,6 +67,7 @@ self_read, self_write = IO.pipe end end +Sidekiq.redis {|c| c.flushdb} def handle_signal(launcher, sig) Sidekiq.logger.debug "Got #{sig} signal" case sig diff --git a/test/test_web.rb b/test/test_web.rb index 4fcc3dac..72ded94e 100644 --- a/test/test_web.rb +++ b/test/test_web.rb @@ -39,6 +39,15 @@ class TestWeb < Sidekiq::Test rackenv = {'HTTP_ACCEPT_LANGUAGE' => 'en-us'} get '/', {}, rackenv assert_match(/Dashboard/, last_response.body) + rackenv = {'HTTP_ACCEPT_LANGUAGE' => 'zh-cn'} + get '/', {}, rackenv + assert_match(/信息板/, last_response.body) + rackenv = {'HTTP_ACCEPT_LANGUAGE' => 'zh-tw'} + get '/', {}, rackenv + assert_match(/資訊主頁/, last_response.body) + rackenv = {'HTTP_ACCEPT_LANGUAGE' => 'nb'} + get '/', {}, rackenv + assert_match(/Oversikt/, last_response.body) end describe 'busy' do diff --git a/test/test_web_helpers.rb b/test/test_web_helpers.rb index 9fb940c2..2ac92b09 100644 --- a/test/test_web_helpers.rb +++ b/test/test_web_helpers.rb @@ -41,6 +41,9 @@ class TestWebHelpers < Sidekiq::Test obj = Helpers.new('HTTP_ACCEPT_LANGUAGE' => 'zh-CN,zh;q=0.8,en-US;q=0.6,en;q=0.4,ru;q=0.2') assert_equal 'zh-cn', obj.locale + obj = Helpers.new('HTTP_ACCEPT_LANGUAGE' => 'nb-NO,nb;q=0.2') + assert_equal 'nb', obj.locale + obj = Helpers.new('HTTP_ACCEPT_LANGUAGE' => 'en-us; *') assert_equal 'en', obj.locale diff --git a/web/locales/no.yml b/web/locales/nb.yml similarity index 89% rename from web/locales/no.yml rename to web/locales/nb.yml index 02ea4a5b..60caf2b2 100644 --- a/web/locales/no.yml +++ b/web/locales/nb.yml @@ -1,5 +1,5 @@ # elements like %{queue} are variables and should not be translated -no: +nb: Dashboard: Oversikt Status: Status Time: Tid @@ -33,6 +33,7 @@ no: NextRetry: Neste forsøk RetryCount: Antall forsøk RetryNow: Forsøk igjen nå + Kill: Kill LastRetry: Forrige forsøk OriginallyFailed: Feilet opprinnelig AreYouSure: Er du sikker? @@ -58,7 +59,6 @@ no: OneMonth: 1 måned ThreeMonths: 3 måneder SixMonths: 6 måneder - Batches: Samlinger Failures: Feil DeadJobs: Døde jobber NoDeadJobsFound: Ingen døde jobber funnet @@ -67,3 +67,11 @@ no: Thread: Tråd Threads: Tråder Jobs: Jobber + Paused: Pauset + Stop: Stopp + Quiet: Demp + StopAll: Stopp alle + QuietAll: Demp alle + PollingInterval: Oppdateringsintervall + Plugins: Innstikk + NotYetEnqueued: Ikke køet enda