Skip to content

Commit

Permalink
code review: no default argument for function
Browse files Browse the repository at this point in the history
  • Loading branch information
vdegove committed Feb 5, 2025
1 parent 8914b92 commit 7c98fd5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
1 change: 0 additions & 1 deletion apps/transport/lib/transport/preemptive_api_cache.ex
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ defmodule Transport.PreemptiveAPICache do
first_run: 0,
job_delay: :timer.seconds(300),
# more than twice job_delay to reduce the risk of parallel computation

cache_ttl: :timer.seconds(700)

require Logger
Expand Down
4 changes: 2 additions & 2 deletions apps/transport/lib/transport/preemptive_base_cache.ex
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,12 @@ defmodule Transport.PreemptiveBaseCache do
{:ok, state}
end

def schedule_next_occurrence(delay \\ @job_delay) do
def schedule_next_occurrence(delay) do
Process.send_after(self(), :tick, delay)
end

def handle_info(:tick, state) do
schedule_next_occurrence()
schedule_next_occurrence(@job_delay)
populate_cache()
{:noreply, state}
end
Expand Down

0 comments on commit 7c98fd5

Please sign in to comment.