Module: RoundhouseUi
- Defined in:
- lib/roundhouse_ui.rb,
lib/roundhouse_ui/audit.rb,
lib/roundhouse_ui/fetch.rb,
lib/roundhouse_ui/pause.rb,
lib/roundhouse_ui/engine.rb,
lib/roundhouse_ui/metrics.rb,
lib/roundhouse_ui/version.rb,
lib/roundhouse_ui/redaction.rb,
lib/roundhouse_ui/snapshots.rb,
lib/roundhouse_ui/cancellation.rb,
lib/roundhouse_ui/observability.rb,
lib/roundhouse_ui/cancel_middleware.rb,
app/helpers/roundhouse_ui/nav_helper.rb,
app/helpers/roundhouse_ui/application_helper.rb,
app/controllers/roundhouse_ui/busy_controller.rb,
app/controllers/roundhouse_ui/dead_controller.rb,
app/controllers/roundhouse_ui/jobs_controller.rb,
app/controllers/roundhouse_ui/audit_controller.rb,
app/controllers/roundhouse_ui/redis_controller.rb,
app/helpers/roundhouse_ui/observability_helper.rb,
app/controllers/roundhouse_ui/assets_controller.rb,
app/controllers/roundhouse_ui/errors_controller.rb,
app/controllers/roundhouse_ui/queues_controller.rb,
app/controllers/roundhouse_ui/metrics_controller.rb,
app/controllers/roundhouse_ui/retries_controller.rb,
app/controllers/roundhouse_ui/workers_controller.rb,
app/controllers/roundhouse_ui/capsules_controller.rb,
app/controllers/roundhouse_ui/dashboard_controller.rb,
app/controllers/roundhouse_ui/scheduled_controller.rb,
app/controllers/roundhouse_ui/snapshots_controller.rb,
app/controllers/roundhouse_ui/application_controller.rb,
app/controllers/concerns/roundhouse_ui/job_set_browsing.rb
Overview
Brand name is "Roundhouse"; the gem and Ruby namespace are RoundhouseUi
(matching the published gem name roundhouse_ui).
Defined Under Namespace
Modules: ApplicationHelper, Audit, Cancellation, JobSetBrowsing, NavHelper, Observability, ObservabilityHelper, Pause, Redaction, Snapshots Classes: ApplicationController, AssetsController, AuditController, BusyController, CancelMiddleware, CapsulesController, DashboardController, DeadController, Engine, ErrorsController, Fetch, JobsController, Metrics, MetricsController, QueuesController, RedisController, RetriesController, ScheduledController, SnapshotsController, WorkersController
Constant Summary collapse
- VERSION =
"0.6.0"
Class Attribute Summary collapse
-
.actor_resolver ⇒ Object
How the audit log names the person taking an action.
-
.allow_job_editing ⇒ Object
Opt-in: enqueue brand-new jobs and edit/re-enqueue existing ones from the UI.
- .observability ⇒ Object
-
.pause_enabled ⇒ Object
Queue pause/resume is only enforced when RoundhouseUi::Fetch is installed as the server's fetch strategy.
-
.poll_interval ⇒ Object
Seconds between dashboard stat polls.
-
.read_only ⇒ Object
When true, destructive actions (purge, retry, delete, …) are disabled.
-
.redact_args ⇒ Object
Argument keys (substring, case-insensitive) to mask when displaying jobs.
-
.show_sidekiq_failures ⇒ Object
Opt-in: fold failures recorded by the
sidekiq-failuresgem (itsfailedsorted set) into the grouped Errors view. - .snapshot_store ⇒ Object
Class Method Summary collapse
-
.cancelled?(jid) ⇒ Boolean
Cooperative cancellation check for long-running jobs: raise SomeStop if RoundhouseUi.cancelled?(jid).
-
.configure {|_self| ... } ⇒ Object
Configure in an initializer:.
Class Attribute Details
.actor_resolver ⇒ Object
How the audit log names the person taking an action. Auth is the host's job, so give Roundhouse a callable that pulls the actor from the request:
RoundhouseUi.actor_resolver = ->(controller) { controller.current_user&.email }
Defaults to "anonymous".
44 45 46 |
# File 'lib/roundhouse_ui.rb', line 44 def actor_resolver @actor_resolver end |
.allow_job_editing ⇒ Object
Opt-in: enqueue brand-new jobs and edit/re-enqueue existing ones from the UI. Off by default — it's a sharp tool (bad edits create unrunnable jobs).
48 49 50 |
# File 'lib/roundhouse_ui.rb', line 48 def allow_job_editing @allow_job_editing end |
.observability ⇒ Object
34 35 36 |
# File 'lib/roundhouse_ui.rb', line 34 def observability @observability ||= Observability::NullAdapter.new end |
.pause_enabled ⇒ Object
Queue pause/resume is only enforced when RoundhouseUi::Fetch is installed as the server's fetch strategy. If you run reliable fetch (Sidekiq Pro/Enterprise super_fetch) you can't also run our fetcher, so pause can't be enforced — set this to false to hide the pause controls and the "not enforced" warning entirely. Default: true.
70 71 72 |
# File 'lib/roundhouse_ui.rb', line 70 def pause_enabled @pause_enabled end |
.poll_interval ⇒ Object
Seconds between dashboard stat polls. Lower = livelier, but each poll also re-runs the host's auth/routing on the mount, so a busy console can add DB load. Default 5s; raise it if polling shows up in your traces.
63 64 65 |
# File 'lib/roundhouse_ui.rb', line 63 def poll_interval @poll_interval end |
.read_only ⇒ Object
When true, destructive actions (purge, retry, delete, …) are disabled. Mount Roundhouse read-only where operators should only observe.
20 21 22 |
# File 'lib/roundhouse_ui.rb', line 20 def read_only @read_only end |
.redact_args ⇒ Object
Argument keys (substring, case-insensitive) to mask when displaying jobs. e.g. RoundhouseUi.redact_args = %w[password token secret]. Default: none.
52 53 54 |
# File 'lib/roundhouse_ui.rb', line 52 def redact_args @redact_args end |
.show_sidekiq_failures ⇒ Object
Opt-in: fold failures recorded by the sidekiq-failures gem (its failed
sorted set) into the grouped Errors view. Off by default, and a no-op
unless sidekiq-failures is loaded. Jobs with retry: false never enter
Sidekiq's retry/dead sets, so this is the only way to surface them here.
58 59 60 |
# File 'lib/roundhouse_ui.rb', line 58 def show_sidekiq_failures @show_sidekiq_failures end |
.snapshot_store ⇒ Object
26 27 28 |
# File 'lib/roundhouse_ui.rb', line 26 def snapshot_store @snapshot_store ||= Snapshots::RedisStore.new end |
Class Method Details
.cancelled?(jid) ⇒ Boolean
Cooperative cancellation check for long-running jobs:
raise SomeStop if RoundhouseUi.cancelled?(jid)
83 84 85 |
# File 'lib/roundhouse_ui.rb', line 83 def cancelled?(jid) Cancellation.cancelled?(jid) end |
.configure {|_self| ... } ⇒ Object
Configure in an initializer:
RoundhouseUi.configure do |c|
c.read_only = !Rails.env.development?
end
77 78 79 |
# File 'lib/roundhouse_ui.rb', line 77 def configure yield self end |