nexaas-queue_time 0.4.0 → 0.5.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ad3b8c239e7f61f49a5d13cd73b25b5994d2a3b0a42d5704a9e8f66441e47c82
4
- data.tar.gz: 15ba7446f5c413b0acb4c5f8814c3fa1c8fc031cadcbbf9e8f8dc73d4432c901
3
+ metadata.gz: ce96f0b48885cc529527b3e97d5bc08c4224a877bd2a0a063101d4543a272113
4
+ data.tar.gz: be446e7ff534bde11f41a31f727462ffaa654b62485b7fbaf7e808a52604af5d
5
5
  SHA512:
6
- metadata.gz: cfda400a36b89195e3c77d4206db785adbccfba5832de421c85d37f8204f496671fbb3d4f8cec4e3c1e14fd44e72f114029b25ab68663b9b4b8604dcc6571e4b
7
- data.tar.gz: 84582ac1dc90af7a69fdeddda4afd9507141ab68a25e832bdaafbf75480ef429916eb0534a0efc7ccc05d104e6834c49baa9948086fe65ec5f9245d595e0e492
6
+ metadata.gz: d1e269b48ace478c498751d692e97d598addb18961527494ed633c27730ab5c89c971bf92badd13369b8d4cc69c348f1185696d9f6e7845a1860e1d948f7faa0
7
+ data.tar.gz: 94a374b120eaa573388bb8b56648f068bc45993fc2441c2cfcf9aea78162d1adab83561bc7ac1466feb466dc547548ef4f569df0e22126ec970a62feafd8ab1b
data/CHANGELOG.md CHANGED
@@ -2,6 +2,12 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file.
4
4
 
5
+ ## [0.5.0] - 2019-09-25
6
+
7
+ ### Added
8
+
9
+ - Set Redis namespace when needed
10
+
5
11
  ## [0.4.0] - 2019-08-22
6
12
 
7
13
  ### Added
@@ -39,3 +45,4 @@ All notable changes to this project will be documented in this file.
39
45
  [0.2.0]: https://github.com/myfreecomm/nexaas-queue_time/compare/v0.1.0...v0.2.0/
40
46
  [0.3.0]: https://github.com/myfreecomm/nexaas-queue_time/compare/v0.2.0...v0.3.0/
41
47
  [0.4.0]: https://github.com/myfreecomm/nexaas-queue_time/compare/v0.3.0...v0.4.0/
48
+ [0.4.0]: https://github.com/myfreecomm/nexaas-queue_time/compare/v0.4.0...v0.5.0/
data/Dockerfile CHANGED
@@ -1,6 +1,5 @@
1
1
  FROM ruby:2.6-alpine
2
2
 
3
- ARG GEM_VERSION=0.4.0
3
+ ARG GEM_VERSION=0.5.0
4
4
 
5
- RUN gem install nexaas-queue_time:$GEM_VERSION
6
- RUN gem install sidekiq
5
+ RUN gem install nexaas-queue_time:$GEM_VERSION sidekiq redis-namespace
data/README.md CHANGED
@@ -48,6 +48,10 @@ After calculating the `queue_time`, this gem sends it to a [DogStatsD](https://d
48
48
 
49
49
  Without the _DogStatsD_ agent this gem is pretty much useless.
50
50
 
51
+ ### Sidekiq metrics collector
52
+
53
+ This gem comes with a binary called `sidekiq_metric_collector`. This binary will send to _DogStatsD_ the latency for all Sidekiq queues every 10 seconds.
54
+
51
55
  ## Development
52
56
 
53
57
  After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
@@ -10,6 +10,12 @@ module Nexaas
10
10
  class Sidekiq
11
11
  METRIC_NAME = 'sidekiq.queue.latency_ms'
12
12
 
13
+ if ENV['REDIS_NAMESPACE']
14
+ Sidekiq.configure_client do |config|
15
+ config.redis = { namespace: ENV['REDIS_NAMESPACE'] }
16
+ end
17
+ end
18
+
13
19
  def self.measure_latency
14
20
  ::Sidekiq::Queue.all.each do |queue|
15
21
  latency_in_ms = (queue.latency * 1000).ceil
@@ -1,5 +1,5 @@
1
1
  module Nexaas
2
2
  module QueueTime
3
- VERSION = '0.4.0'
3
+ VERSION = '0.5.0'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nexaas-queue_time
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lucas Mansur
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-08-22 00:00:00.000000000 Z
11
+ date: 2019-09-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: dogstatsd-ruby