Skip to content

Commit

Permalink
Document overriding the estimate limit
Browse files Browse the repository at this point in the history
  • Loading branch information
sorentwo committed Nov 22, 2024
1 parent 392fb8e commit dcceebf
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions guides/introduction/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,18 @@ plugins: [
...
]
```

## Customizing Estimates

Options for internal `Oban.Met` processes can be overridden from the plugin specification. Most
options are internal and not meant to be overridden, but one particularly useful option to tune is
the `estimate_limit`. The `estimate_limit` determines at which point state/queue counts switch
from using an accurate `count(*)` call to a much more efficient, but less accurate, estiamte
function.

The default limit is a conservative 50k, which may be too low for systems with insert spikes. This
declares an override to set the limit to 200k:

```elixir
{Oban.Met, reporter: [estimate_limit: 200_000]}
```

0 comments on commit dcceebf

Please sign in to comment.