roundhouse_ui 0.2.0 → 0.3.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/README.md +29 -0
- data/app/controllers/roundhouse_ui/errors_controller.rb +12 -1
- data/lib/roundhouse_ui/version.rb +1 -1
- data/lib/roundhouse_ui.rb +7 -0
- 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: 55d676d5630bc1696fd0c44d58494a84263d53c340ceffeb1bc44c04c9201dfa
|
|
4
|
+
data.tar.gz: b314d38079f0f8eee84ba9052dd781841fd6dba2fc7f612e82d25466b5c62c9f
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 0454ea6d65176e5d5c79893dc52982e985231ff51f6e503624f7d19af60beabec808ced45cc27a2cd3c2021044e5b6d5d7c1bdf26193ef98833a27e6faaad17f
|
|
7
|
+
data.tar.gz: 1aa6b74df3071ced45e118dda22aa0d0caadc17a10fd64c4dec45c187dc7d68866e8e417529a6ad424dc467960481a7187de908283e4dc7932c2977ea047e70c
|
data/README.md
CHANGED
|
@@ -79,9 +79,17 @@ RoundhouseUi.configure do |c|
|
|
|
79
79
|
|
|
80
80
|
# Where queue snapshots are stored (default: Redis). Swap for a file/S3 store.
|
|
81
81
|
# c.snapshot_store = MyS3SnapshotStore.new
|
|
82
|
+
|
|
83
|
+
# Fold sidekiq-failures' `failed` set into the Errors view (see below).
|
|
84
|
+
# No-op unless the sidekiq-failures gem is loaded. Default: off.
|
|
85
|
+
c.show_sidekiq_failures = true
|
|
82
86
|
end
|
|
83
87
|
```
|
|
84
88
|
|
|
89
|
+
Every option is independent and has a safe default — set only what you need.
|
|
90
|
+
`read_only`, `allow_job_editing`, and `show_sidekiq_failures` default to `false`;
|
|
91
|
+
`redact_args` to `[]`; `observability` to a no-op adapter; `snapshot_store` to Redis.
|
|
92
|
+
|
|
85
93
|
## Pausing queues
|
|
86
94
|
|
|
87
95
|
Pause/resume is pure OSS. To make a pause actually stop a queue from being worked,
|
|
@@ -99,6 +107,27 @@ all of Sidekiq's weighting/ordering. Until it's installed, the Queues page recor
|
|
|
99
107
|
but **warns that they aren't enforced** (worker and web are separate processes, so
|
|
100
108
|
Roundhouse detects whether a fetcher has reported in).
|
|
101
109
|
|
|
110
|
+
> ⚠️ **Sidekiq Pro/Enterprise users:** super_fetch / reliable fetch sets its own
|
|
111
|
+
> `fetch_class`, and Sidekiq allows only one. Installing `RoundhouseUi::Fetch` would
|
|
112
|
+
> **replace reliable fetch and lose its crash-recovery guarantees** — don't. On those
|
|
113
|
+
> tiers, leave the fetch strategy out; pause/resume stays inert and the UI says so.
|
|
114
|
+
|
|
115
|
+
## Surfacing sidekiq-failures
|
|
116
|
+
|
|
117
|
+
If you use [`sidekiq-failures`](https://github.com/mhfs/sidekiq-failures), failures it
|
|
118
|
+
records live in their own Redis set — which Roundhouse doesn't read by default. Jobs with
|
|
119
|
+
`retry: false` are the common case: they fail, get recorded there, but never enter the
|
|
120
|
+
retry or dead sets, so they're invisible in Roundhouse. Opt in to fold them into the
|
|
121
|
+
grouped **Errors** view:
|
|
122
|
+
|
|
123
|
+
```ruby
|
|
124
|
+
# config/initializers/roundhouse.rb
|
|
125
|
+
RoundhouseUi.configure { |c| c.show_sidekiq_failures = true }
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
It's a no-op unless `sidekiq-failures` is loaded. Failures appear in **Errors** grouped by
|
|
129
|
+
job class + error (not yet as an individual-job list with per-row actions).
|
|
130
|
+
|
|
102
131
|
## Cancelling jobs
|
|
103
132
|
|
|
104
133
|
Cancellation is cooperative — Ruby can't safely kill a running thread. Install the
|
|
@@ -18,7 +18,7 @@ module RoundhouseUi
|
|
|
18
18
|
scanned = 0
|
|
19
19
|
truncated = false
|
|
20
20
|
|
|
21
|
-
|
|
21
|
+
sources.each do |source, set|
|
|
22
22
|
set.each do |entry|
|
|
23
23
|
scanned += 1
|
|
24
24
|
if scanned > SCAN_LIMIT
|
|
@@ -35,6 +35,17 @@ module RoundhouseUi
|
|
|
35
35
|
[ list, scanned, truncated ]
|
|
36
36
|
end
|
|
37
37
|
|
|
38
|
+
# Sidekiq's native sets, plus the sidekiq-failures `failed` set when opted in
|
|
39
|
+
# and that gem is loaded. Its FailureSet is a Sidekiq::JobSet, so it iterates
|
|
40
|
+
# exactly like the others — no special-casing in the aggregation above.
|
|
41
|
+
def sources
|
|
42
|
+
sets = { "retry" => Sidekiq::RetrySet.new, "dead" => Sidekiq::DeadSet.new }
|
|
43
|
+
if RoundhouseUi.show_sidekiq_failures && defined?(Sidekiq::Failures::FailureSet)
|
|
44
|
+
sets["failed"] = Sidekiq::Failures::FailureSet.new
|
|
45
|
+
end
|
|
46
|
+
sets
|
|
47
|
+
end
|
|
48
|
+
|
|
38
49
|
def record(groups, source, entry)
|
|
39
50
|
error = entry.item["error_class"] || "UnknownError"
|
|
40
51
|
group = (groups["#{entry.klass}|#{error}"] ||= {
|
data/lib/roundhouse_ui.rb
CHANGED
|
@@ -51,6 +51,12 @@ module RoundhouseUi
|
|
|
51
51
|
# e.g. RoundhouseUi.redact_args = %w[password token secret]. Default: none.
|
|
52
52
|
attr_accessor :redact_args
|
|
53
53
|
|
|
54
|
+
# Opt-in: fold failures recorded by the `sidekiq-failures` gem (its `failed`
|
|
55
|
+
# sorted set) into the grouped Errors view. Off by default, and a no-op
|
|
56
|
+
# unless sidekiq-failures is loaded. Jobs with `retry: false` never enter
|
|
57
|
+
# Sidekiq's retry/dead sets, so this is the only way to surface them here.
|
|
58
|
+
attr_accessor :show_sidekiq_failures
|
|
59
|
+
|
|
54
60
|
# Configure in an initializer:
|
|
55
61
|
#
|
|
56
62
|
# RoundhouseUi.configure do |c|
|
|
@@ -70,4 +76,5 @@ module RoundhouseUi
|
|
|
70
76
|
self.read_only = false
|
|
71
77
|
self.allow_job_editing = false
|
|
72
78
|
self.redact_args = []
|
|
79
|
+
self.show_sidekiq_failures = false
|
|
73
80
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: roundhouse_ui
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.3.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- R.J. Robinson
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-06-
|
|
11
|
+
date: 2026-06-30 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rails
|