peak_flow_utils 0.1.17 → 0.1.18
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1d6ad793f87d038dc928420a3c35e046fa1fcfb4f610e4fd6bd1c9f8fa445a9e
|
4
|
+
data.tar.gz: 9abdb774bfa6fd91896dfdbe55b6d6d7e931804035712aa51e1c576ab9d4d6cf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ef054a48493eb11175e79cfdac7b9c2ae5258c8d67c3113bb0c61633404df7c6b674dc2fda6809a3c0ded02533f7fe88407bc4b8693a6c982d772f84a1f2de51
|
7
|
+
data.tar.gz: 6b4cd15ee4e07feabc1e0c4b6bb9efc59aff36dad76c8fae97ff9f8d1d486dc570ae5e69997f872105dffc6036e167beb00e0995b5b115561964facc12b63da2
|
data/README.md
CHANGED
@@ -58,6 +58,26 @@ If you want the job name and its arguments logged in parameters you can execute
|
|
58
58
|
PeakFlowUtils::SidekiqParametersLogging.execute!
|
59
59
|
```
|
60
60
|
|
61
|
+
### Sidekiq and Postgres pings
|
62
|
+
|
63
|
+
Add this to `routes.rb`:
|
64
|
+
```ruby
|
65
|
+
Rails.application.routes.draw do
|
66
|
+
mount PeakFlowUtils::Engine => "/peakflow_utils"
|
67
|
+
```
|
68
|
+
|
69
|
+
Add these to .env variables:
|
70
|
+
```
|
71
|
+
PEAKFLOW_PINGS_USERNAME=username
|
72
|
+
PEAKFLOW_PINGS_PASSWORD=secret-password
|
73
|
+
```
|
74
|
+
|
75
|
+
You can now add a HTTP ping on this path:
|
76
|
+
`/peakflow_utils/pings/sidekiq`
|
77
|
+
|
78
|
+
And this for Postgres:
|
79
|
+
`/pings/postgres_connections`
|
80
|
+
|
61
81
|
## Contributing
|
62
82
|
Contribution directions go here.
|
63
83
|
|
@@ -9,7 +9,7 @@ private
|
|
9
9
|
authenticate_or_request_with_http_basic do |username, password|
|
10
10
|
if ENV["PEAKFLOW_PINGS_USERNAME"].blank? || ENV["PEAKFLOW_PINGS_PASSWORD"].blank?
|
11
11
|
Rails.logger.error "Peakflow utils: Pings called but PEAKFLOW_PINGS_USERNAME or PEAKFLOW_PINGS_PASSWORD wasn't set"
|
12
|
-
false
|
12
|
+
return false
|
13
13
|
end
|
14
14
|
|
15
15
|
username == ENV.fetch("PEAKFLOW_PINGS_USERNAME") && password == ENV.fetch("PEAKFLOW_PINGS_PASSWORD")
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: peak_flow_utils
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.18
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- kaspernj
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-02-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|