Skip to content

Commit

Permalink
Start Location and Locus in parallel
Browse files Browse the repository at this point in the history
  • Loading branch information
vinibrsl committed Jan 13, 2023
1 parent 18a904c commit 35393b2
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions lib/plausible/application.ex
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,18 @@ defmodule Plausible.Application do
]

opts = [strategy: :one_for_one, name: Plausible.Supervisor]

setup_sentry()
setup_opentelemetry()
setup_geolocation()
Location.load_all()

Task.await_many(
[
Task.async(&setup_geolocation/0),
Task.async(&Location.load_all/0)
],
15_000
)

Supervisor.start_link(children, opts)
end

Expand Down

0 comments on commit 35393b2

Please sign in to comment.