sidekiq-influxdb 1.1.0 → 1.2.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 +4 -0
- data/README.md +4 -9
- data/lib/sidekiq/influxdb/version.rb +1 -1
- data/lib/sidekiq/middleware/server/influxdb.rb +5 -2
- 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: 296e82fa67ee8923029ede73aeb7e01ced718a7a54f45c2f8b4474995e005676
|
4
|
+
data.tar.gz: e82b65aa52eb9410ad4a0d3d0993ffa50061b5f27cb5d20b5b5449e4336fcfe7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 074c2ce097b58a2cb91e77094aa2d9da42d841f5ef2ee8ff8e662f1d417546c5bc46bff5fb499b7b85d5e0809e525a2bcb5b065209cd8a6d22e0a3b9721fe2d5
|
7
|
+
data.tar.gz: a3cb6f42f17fa9e15c6b15036b52a87b0e8311a5d0fbd29e9680809fe99b42caa6f21e321898a0e9f9f90432d15844563d0badab0683cedd46274080de6289d7
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -10,14 +10,6 @@ Add this gem to your application's `Gemfile`:
|
|
10
10
|
|
11
11
|
## Usage
|
12
12
|
|
13
|
-
Sidekiq middleware description:
|
14
|
-
|
15
|
-
https://github.com/mperham/sidekiq/wiki/Middleware
|
16
|
-
|
17
|
-
InfluxDB client description:
|
18
|
-
|
19
|
-
https://github.com/influxdata/influxdb-ruby/blob/master/README.md
|
20
|
-
|
21
13
|
Add included middleware to your application's Sidekiq middleware stack:
|
22
14
|
|
23
15
|
```ruby
|
@@ -51,7 +43,7 @@ When you deploy this code, you will start getting the following series in your I
|
|
51
43
|
|
52
44
|
Tags (repetitive, indexed data — for filtering and grouping by):
|
53
45
|
|
54
|
-
* `time` — Standard InfluxDB timestamp. Precision of the supplied client is respected.
|
46
|
+
* `time` — Standard InfluxDB timestamp. Precision of the supplied client is respected.
|
55
47
|
* `queue` — Queue name.
|
56
48
|
* `class` — Job class name. Classes from `except:` keyword argument are skipped (no data is sent to InfluxDB).
|
57
49
|
* `event` — What happened to the job at the specified `time`: `start`, `finish`, or `error`. If you initialize the middleware with `start_events: false`, there will be no `start` events.
|
@@ -87,6 +79,9 @@ Et cetera.
|
|
87
79
|
|
88
80
|
## Development
|
89
81
|
|
82
|
+
* [Sidekiq middleware](https://github.com/mperham/sidekiq/wiki/Middleware)
|
83
|
+
* [InfluxDB client](https://github.com/influxdata/influxdb-ruby)
|
84
|
+
|
90
85
|
After checking out the repo, run `bin/setup` to install dependencies. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
91
86
|
|
92
87
|
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
@@ -70,9 +70,12 @@ module Sidekiq
|
|
70
70
|
def in_correct_precision(t)
|
71
71
|
case precision
|
72
72
|
# In order of probability in real-world setups
|
73
|
-
when 'ms' then (t *
|
73
|
+
when 'ms' then (t * 1_000).to_i
|
74
74
|
when 's' then t.to_i
|
75
|
-
when 'u' then (t *
|
75
|
+
when 'u' then (t * 1_000_000).to_i
|
76
|
+
when 'ns' then (t * 1_000_000_000).to_i
|
77
|
+
when 'm' then (t / 60).to_i
|
78
|
+
when 'h' then (t / 60 / 60).to_i
|
76
79
|
end
|
77
80
|
end
|
78
81
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sidekiq-influxdb
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ilya Vassilevsky
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2019-05-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: influxdb
|