Skip to content

Commit

Permalink
use env to adjust safe_load timeout (#661)
Browse files Browse the repository at this point in the history
  • Loading branch information
APB9785 authored Nov 20, 2024
1 parent f91a3b3 commit 4058a43
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/beacon/loader/worker.ex
Original file line number Diff line number Diff line change
Expand Up @@ -582,11 +582,12 @@ defmodule Beacon.Loader.Worker do
{:error, {:already_registered, pid}} ->
# another worker already started, let's wait for it
_ref = Process.monitor(pid)
time_to_wait = if(Beacon.Config.env_test?(), do: 500, else: 15_000)

receive do
{:DOWN, _ref, :process, _pid, {:shutdown, :loaded}} -> module
after
1_000 -> :error
time_to_wait -> :error
end
end
end
Expand Down

0 comments on commit 4058a43

Please sign in to comment.