Class: BrainMaintenanceWorker
- Inherits:
-
Object
- Object
- BrainMaintenanceWorker
- Includes:
- Sidekiq::Job
- Defined in:
- app/workers/brain_maintenance_worker.rb
Overview
Daily autonomous pruning of the Sunny brain + a digest email.
Prunes ONLY — auto-rejects ephemeral junk from the pending queue and
auto-applies BrainCompactor's archive / tighten / consolidate over the active
set (reversible via PaperTrail). It never auto-approves: legit pending rules
are surfaced in the digest for a human to approve.
Scheduled ~5 AM Central via config/sidekiq_production_schedule.yml.
Instance Method Summary collapse
-
#perform ⇒ Object
Runs the job.
Instance Method Details
#perform ⇒ Object
Runs the job.
19 20 21 22 23 24 |
# File 'app/workers/brain_maintenance_worker.rb', line 19 def perform summary = Assistant::BrainMaintenance.run! return unless summary.success? && summary.reportable? BrainMaintenanceMailer.daily_digest(summary).deliver_now end |