Skip to content

Commit 60598a6

Browse files
committed
Don’t fetch updates on startup when in test mode
1 parent 8fb93f3 commit 60598a6

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

lib/keila/application.ex

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,11 @@ defmodule Keila.Application do
5959
end
6060

6161
defp maybe_fetch_updates() do
62-
Keila.Instance.UpdateCronWorker.new(%{})
63-
|> Oban.insert()
62+
unless Mix.env() == :test do
63+
:ok = Application.ensure_started(:oban)
64+
65+
Keila.Instance.UpdateCronWorker.new(%{})
66+
|> Oban.insert()
67+
end
6468
end
6569
end

0 commit comments

Comments
 (0)