Packages

A Statistic Counter designed for simplicity and ease of use. Stats are rolled into time periods of your choice.

Current section

Files

Jump to
simplestatex lib stat_supervisor.ex
Raw

lib/stat_supervisor.ex

defmodule SimpleStatEx.StatSupervisor do
use Supervisor
def start_link do
Supervisor.start_link(__MODULE__, nil, name: :stat_supervisor)
end
@doc """
Start an activity child which can be any kind of activity server
"""
def start_child(name) do
Supervisor.start_child(:stat_supervisor, [name])
end
def init(_) do
supervise([worker(SimpleStatEx.Server.SimpleStatSet, [])], strategy: :simple_one_for_one)
end
end