govuk_sidekiq 2.0.0 → 3.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +12 -7
- data/lib/govuk_sidekiq/sidekiq_initializer.rb +2 -1
- data/lib/govuk_sidekiq/testing.rb +1 -0
- data/lib/govuk_sidekiq/version.rb +1 -1
- metadata +33 -13
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1be19282faabbf2677cfc7ef513a07b7eba4cf58
|
4
|
+
data.tar.gz: 95c1fe848d469231ec76263a56a6094dd85d7c6c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5dae35a20d6f158cff09780b6b1d3bea5bef9ca8e24c2588e05136dda98249650224270ca6b3ed1f93827038e48f7f6b10c4fa61c6badc7cb0ce4f795548392f
|
7
|
+
data.tar.gz: 9a13810fcecd5bb5068f357f043507379f106e2808f8e6f61adb2437fcf4166e966b91e17229e6ef3baaa07e4ae637cb1e1361297c8ecc5ad0b1b6676e5499a5
|
data/README.md
CHANGED
@@ -10,13 +10,14 @@ What does `govuk_sidekiq` do for you?
|
|
10
10
|
1. Makes sure Sidekiq can connect to Redis correctly, using the default
|
11
11
|
environment variables (these are set in [govuk-puppet](https://github.com/alphagov/govuk-puppet)).
|
12
12
|
2. Makes sure that the correct HTTP headers are passed on to [gds-api-adapters](https://github.com/alphagov/gds-api-adapters).
|
13
|
-
This means that for each request a unique ID (govuk_request_id) will be passed on to downstream applications.
|
14
|
-
[Read more about request tracing]
|
13
|
+
This means that for each request a unique ID (`govuk_request_id`) will be passed on to downstream applications.
|
14
|
+
[Read more about request tracing][req-tracing].
|
15
15
|
3. Makes sure that we use JSON logging, so that Sidekiq logs will end up
|
16
16
|
properly in Kibana.
|
17
17
|
4. Sends activity stats to Statsd, so that you can make pretty graphs of activity
|
18
18
|
in Grafana or Graphite. See the [Rummager dashboards for an example](https://grafana.publishing.service.gov.uk/dashboard/file/rummager_queues.json).
|
19
|
-
|
19
|
+
|
20
|
+
[req-tracing]: https://docs.publishing.service.gov.uk/manual/setting-up-request-tracing.html
|
20
21
|
|
21
22
|
## Installation (Rails only)
|
22
23
|
|
@@ -55,7 +56,7 @@ requires more advanced connection settings (eg username and password) you can in
|
|
55
56
|
set a `REDIS_URL` variable, this will take precidence over `REDIS_HOST` and `REDIS_PORT`.
|
56
57
|
|
57
58
|
Apply redis variables for your app in [the default config](https://github.com/alphagov/govuk-puppet/blob/master/hieradata/common.yaml). For example:
|
58
|
-
|
59
|
+
|
59
60
|
```
|
60
61
|
govuk::apps::your_app::redis_host: "%{hiera('sidekiq_host')}"
|
61
62
|
govuk::apps::your_app::redis_port: "%{hiera('sidekiq_port')}"
|
@@ -77,12 +78,16 @@ after "deploy:restart", "deploy:restart_procfile_worker"
|
|
77
78
|
|
78
79
|
This makes sure that your development environment behaves like production.
|
79
80
|
|
80
|
-
See the [Pinfile]
|
81
|
-
|
81
|
+
See the [Pinfile][] and [Procfile][] for examples.
|
82
|
+
|
83
|
+
[Pinfile]: https://github.com/alphagov/govuk-puppet/tree/master/development-vm/Pinfile
|
84
|
+
[Procfile]: https://github.com/alphagov/govuk-puppet/tree/master/development-vm/Procfile
|
82
85
|
|
83
86
|
### 7. Add app to sidekiq-monitoring
|
84
87
|
|
85
|
-
See the opsmanual for a step-by-step guide: [
|
88
|
+
See the opsmanual for a step-by-step guide: [Add sidekiq-monitoring to your application][monitoring]
|
89
|
+
|
90
|
+
[monitoring]: https://docs.publishing.service.gov.uk/manual/setting-up-new-sidekiq-monitoring-app.html
|
86
91
|
|
87
92
|
### 8. Create some jobs
|
88
93
|
|
@@ -2,6 +2,7 @@ require "sidekiq"
|
|
2
2
|
require "sidekiq/logging/json"
|
3
3
|
require "sidekiq-statsd"
|
4
4
|
require "govuk_sidekiq/api_headers"
|
5
|
+
require "govuk_app_config/govuk_statsd"
|
5
6
|
|
6
7
|
module GovukSidekiq
|
7
8
|
module SidekiqInitializer
|
@@ -15,7 +16,7 @@ module GovukSidekiq
|
|
15
16
|
config.redis = redis_config
|
16
17
|
|
17
18
|
config.server_middleware do |chain|
|
18
|
-
chain.add Sidekiq::Statsd::ServerMiddleware, env:
|
19
|
+
chain.add Sidekiq::Statsd::ServerMiddleware, statsd: GovukStatsd, env: nil, prefix: "workers"
|
19
20
|
chain.add GovukSidekiq::APIHeaders::ServerMiddleware
|
20
21
|
end
|
21
22
|
end
|
metadata
CHANGED
@@ -1,29 +1,35 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: govuk_sidekiq
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 3.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Elliot Crosby-McCullough
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-08
|
11
|
+
date: 2017-12-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: sidekiq
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '5'
|
20
|
+
- - "<"
|
18
21
|
- !ruby/object:Gem::Version
|
19
|
-
version:
|
22
|
+
version: '6'
|
20
23
|
type: :runtime
|
21
24
|
prerelease: false
|
22
25
|
version_requirements: !ruby/object:Gem::Requirement
|
23
26
|
requirements:
|
24
|
-
- - "
|
27
|
+
- - ">="
|
25
28
|
- !ruby/object:Gem::Version
|
26
|
-
version:
|
29
|
+
version: '5'
|
30
|
+
- - "<"
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: '6'
|
27
33
|
- !ruby/object:Gem::Dependency
|
28
34
|
name: sidekiq-statsd
|
29
35
|
requirement: !ruby/object:Gem::Requirement
|
@@ -72,14 +78,28 @@ dependencies:
|
|
72
78
|
requirements:
|
73
79
|
- - "~>"
|
74
80
|
- !ruby/object:Gem::Version
|
75
|
-
version: 1.
|
81
|
+
version: '1.6'
|
76
82
|
type: :runtime
|
77
83
|
prerelease: false
|
78
84
|
version_requirements: !ruby/object:Gem::Requirement
|
79
85
|
requirements:
|
80
86
|
- - "~>"
|
81
87
|
- !ruby/object:Gem::Version
|
82
|
-
version: 1.
|
88
|
+
version: '1.6'
|
89
|
+
- !ruby/object:Gem::Dependency
|
90
|
+
name: govuk_app_config
|
91
|
+
requirement: !ruby/object:Gem::Requirement
|
92
|
+
requirements:
|
93
|
+
- - ">="
|
94
|
+
- !ruby/object:Gem::Version
|
95
|
+
version: '1.1'
|
96
|
+
type: :runtime
|
97
|
+
prerelease: false
|
98
|
+
version_requirements: !ruby/object:Gem::Requirement
|
99
|
+
requirements:
|
100
|
+
- - ">="
|
101
|
+
- !ruby/object:Gem::Version
|
102
|
+
version: '1.1'
|
83
103
|
- !ruby/object:Gem::Dependency
|
84
104
|
name: rspec
|
85
105
|
requirement: !ruby/object:Gem::Requirement
|
@@ -100,28 +120,28 @@ dependencies:
|
|
100
120
|
requirements:
|
101
121
|
- - "~>"
|
102
122
|
- !ruby/object:Gem::Version
|
103
|
-
version: '
|
123
|
+
version: '12.3'
|
104
124
|
type: :development
|
105
125
|
prerelease: false
|
106
126
|
version_requirements: !ruby/object:Gem::Requirement
|
107
127
|
requirements:
|
108
128
|
- - "~>"
|
109
129
|
- !ruby/object:Gem::Version
|
110
|
-
version: '
|
130
|
+
version: '12.3'
|
111
131
|
- !ruby/object:Gem::Dependency
|
112
132
|
name: railties
|
113
133
|
requirement: !ruby/object:Gem::Requirement
|
114
134
|
requirements:
|
115
135
|
- - "~>"
|
116
136
|
- !ruby/object:Gem::Version
|
117
|
-
version: 5.0
|
137
|
+
version: '5.0'
|
118
138
|
type: :development
|
119
139
|
prerelease: false
|
120
140
|
version_requirements: !ruby/object:Gem::Requirement
|
121
141
|
requirements:
|
122
142
|
- - "~>"
|
123
143
|
- !ruby/object:Gem::Version
|
124
|
-
version: 5.0
|
144
|
+
version: '5.0'
|
125
145
|
- !ruby/object:Gem::Dependency
|
126
146
|
name: bundler
|
127
147
|
requirement: !ruby/object:Gem::Requirement
|
@@ -171,7 +191,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
171
191
|
version: '0'
|
172
192
|
requirements: []
|
173
193
|
rubyforge_project:
|
174
|
-
rubygems_version: 2.6.
|
194
|
+
rubygems_version: 2.6.13
|
175
195
|
signing_key:
|
176
196
|
specification_version: 4
|
177
197
|
summary: Provides standard setup and behaviour for Sidekiq in GOV.UK applications.
|