Skip to content

Commit

Permalink
chore: update moduledoc module example snippets (#41)
Browse files Browse the repository at this point in the history
## Checklist

<!--
For each bullet, ensure your pr meets the criteria and write a note
explaining how this PR relates. Mark them as complete as they are done.
All top-level checkboxes should be checked regardless of their relevance
to the pr with a note explaining whether they are relevant or not.
-->

- [x] Code conforms to the [Elixir
Styleguide](https://github.com/christopheradams/elixir_style_guide)

## Problem

Moduledoc examples were not up to date in terms of the loop interval
config name.

## Details

Modified it to use the correct config name.
  • Loading branch information
seungjinstord authored Mar 20, 2024
1 parent 775886d commit 2c4c8dc
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/buffy/throttle_and_timed.ex
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,8 @@ defmodule Buffy.ThrottleAndTimed do
defmodule MyTask do
use Buffy.ThrottleAndTimed,
throttle: :timer.minutes(2)
loop_timeout: :timer.minutes(2)
throttle: :timer.minutes(2),
loop_interval: :timer.minutes(2)
def handle_throttle(args) do
# Do something with args
Expand Down Expand Up @@ -162,7 +162,7 @@ defmodule Buffy.ThrottleAndTimed do
supervisor_module: Horde.DynamicSupervisor,
supervisor_name: MyApp.HordeDynamicSupervisor,
throttle: :timer.minutes(2),
loop_timeout: :timer.minutes(10)
loop_interval: :timer.minutes(10)
def handle_throttle(args) do
# Do something with args
Expand Down

0 comments on commit 2c4c8dc

Please sign in to comment.