mirror of
https://github.com/wanderer-industries/wanderer
synced 2026-05-01 15:00:31 +00:00
23 lines
577 B
Elixir
23 lines
577 B
Elixir
defmodule WandererApp.Map.ServerSupervisor do
|
|
@moduledoc false
|
|
use Supervisor, restart: :transient
|
|
|
|
alias WandererApp.Map.Server
|
|
|
|
def start_link(args), do: Supervisor.start_link(__MODULE__, args)
|
|
|
|
@impl true
|
|
def init(args) do
|
|
children = [
|
|
{Server, args},
|
|
{DDRT.DynamicRtree,
|
|
[
|
|
conf: [name: "rtree_#{args[:map_id]}", width: 150, verbose: false, seed: 0],
|
|
name: Module.concat([args[:map_id], DDRT.DynamicRtree])
|
|
]}
|
|
]
|
|
|
|
Supervisor.init(children, strategy: :one_for_one, auto_shutdown: :any_significant)
|
|
end
|
|
end
|