From 6b7c930715e7cd8af919f43c924515dd36550480 Mon Sep 17 00:00:00 2001 From: Jonathan Thomas <5272593+jondthomas@users.noreply.github.com> Date: Tue, 3 Oct 2023 12:05:33 -0400 Subject: [PATCH] chore: Update callback to match spec --- lib/buffy/throttle.ex | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/buffy/throttle.ex b/lib/buffy/throttle.ex index ec83698..c4f26fa 100644 --- a/lib/buffy/throttle.ex +++ b/lib/buffy/throttle.ex @@ -107,11 +107,11 @@ defmodule Buffy.Throttle do @type state :: {key(), args()} @doc """ - A function to call the throttle. This will always return a tuple of `{:ok, pid()}` + A function to call the throttle. This will start and wait the configured `throttle` time before calling the `c:handle_throttle/1` function. """ - @callback throttle(args :: args()) :: {:ok, pid()} + @callback throttle(args :: args()) :: :ok | {:error, term()} @doc """ The function called after the throttle has completed. This function will