Packages

A local, decentralized and scalable weighted round-robin generator.

Current section

Files

Jump to
wrr lib weighted_round_robin application.ex
Raw

lib/weighted_round_robin/application.ex

defmodule WeightedRoundRobin.Application do
@moduledoc false
use Application
def start(_type, _args) do
children =
if Application.get_env(:wrr, :start, true) == true,
do: [{WeightedRoundRobin, name: WeightedRoundRobin}],
else: []
Supervisor.start_link(children, strategy: :one_for_one, name: WeightedRoundRobin.Supervisor)
end
end