ObanDoctor.Check.Config.MissingPruner (oban_doctor v0.2.2)

Copy Markdown View Source

Checks for Oban instances without a pruner plugin configured.

Without a pruner, completed and discarded jobs accumulate in the database indefinitely, leading to storage growth and performance degradation over time.

How to fix

Add a pruner plugin to your Oban configuration:

config :my_app, Oban,
  plugins: [
    {Oban.Plugins.Pruner, max_age: 60 * 60 * 24 * 7}  # 7 days
  ],
  queues: [default: 10]

If using Oban Pro, you can use Oban.Pro.Plugins.DynamicPruner instead.

See Oban Pruner plugin.

Configuration

In .oban_doctor.exs:

checks: [
  missing_pruner: [
    # Disable the check entirely
    enabled: false,

    # Or exclude specific Oban instances from this check
    excluded_instances: [MyApp.SecondaryOban]
  ]
]