nexaas-queue_time 0.4.0 → 0.5.0
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/CHANGELOG.md +7 -0
- data/Dockerfile +2 -3
- data/README.md +4 -0
- data/lib/nexaas/queue_time/sidekiq.rb +6 -0
- data/lib/nexaas/queue_time/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: ce96f0b48885cc529527b3e97d5bc08c4224a877bd2a0a063101d4543a272113
|
|
4
|
+
data.tar.gz: be446e7ff534bde11f41a31f727462ffaa654b62485b7fbaf7e808a52604af5d
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
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
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
|
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
|
+
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-
|
|
11
|
+
date: 2019-09-25 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: dogstatsd-ruby
|