Skip to content

Make Que an optional dependency via job source adapters#33

Merged
saturnflyer merged 2 commits intomainfrom
configurable-jobs
Feb 10, 2026
Merged

Make Que an optional dependency via job source adapters#33
saturnflyer merged 2 commits intomainfrom
configurable-jobs

Conversation

@saturnflyer
Copy link
Member

@saturnflyer saturnflyer commented Feb 10, 2026

Summary

  • Introduces a Jobs adapter module (mirroring the existing Warnings and Exceptions patterns) with a Base class, registry, and a Que adapter
  • Adds JobReporter that delegates data-fetching to a configured adapter
  • Removes QueReporter and the hard que gem dependency
  • Job monitoring is now opt-in via config.job_source = :que (or a custom adapter)

Breaking Changes

  • Newshound::QueReporter has been removed — use Newshound::JobReporter instead
  • The que gem is no longer a runtime dependency — apps using Que must add it to their own Gemfile
  • Existing Que users must add config.job_source = :que to their Newshound initializer

Test plan

  • All 88 specs pass (bundle exec rake spec)
  • Zero lint violations (bundle exec standardrb)
  • Verify in a host app with config.job_source = :que that banner shows job stats
  • Verify in a host app without config.job_source that banner renders without job section errors

Introduce a Jobs module with the same adapter pattern used by
Exceptions and Warnings: a Base class, a registry with factory
method, and a Que adapter that extracts the SQL logic from the
former QueReporter. JobReporter delegates data-fetching to the
configured adapter.

Added: Jobs adapter pattern with Base class and registry
Added: Jobs::Que adapter for Que job backend
Added: JobReporter that delegates to a configurable job source adapter
Wire up JobReporter and Jobs module across the codebase. Remove
QueReporter and its hard Que dependency. Job monitoring is now
opt-in via config.job_source.

Changed: Job monitoring uses configurable adapter pattern via config.job_source
Removed: Hard dependency on que gem
Removed: QueReporter class (replaced by JobReporter + Jobs adapters)
Version: major
@saturnflyer saturnflyer requested a review from a team as a code owner February 10, 2026 18:22
@saturnflyer saturnflyer merged commit 1df3bad into main Feb 10, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant