Skip to content

Commit

Permalink
better job delay not exactly twice
Browse files Browse the repository at this point in the history
Co-authored-by: Thibaut Barrère <[email protected]>
  • Loading branch information
vdegove and thbar authored Jan 28, 2025
1 parent 437d167 commit 1f00651
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 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,8 @@ defmodule Transport.PreemptiveAPICache do
require Logger

@job_delay :timer.seconds(300)
@cache_ttl :timer.seconds(600)
# slightly more than twice `@job_delay` to reduce the risk of parallel computation
@cache_ttl :timer.seconds(700)

def cache_ttl, do: @cache_ttl

Expand Down

0 comments on commit 1f00651

Please sign in to comment.