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 506c2f1
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
2 changes: 1 addition & 1 deletion config/.env.dev
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ ADMIN_USER_IDS=1
SHOW_CITIES=true
PADDLE_VENDOR_AUTH_CODE=895e20d4efaec0575bb857f44b183217b332d9592e76e69b8a
PADDLE_VENDOR_ID=3942

MAXMIND_LICENSE_KEY=odoBRnUmhzfTygG0
GOOGLE_CLIENT_ID=875387135161-l8tp53dpt7fdhdg9m1pc3vl42si95rh0.apps.googleusercontent.com
GOOGLE_CLIENT_SECRET=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

Expand Down
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 506c2f1

Please sign in to comment.