use default child_specs

This commit is contained in:
stwf 2019-08-14 11:55:17 -04:00
commit 51bdf0cab6
13 changed files with 73 additions and 143 deletions

View file

@ -7,7 +7,9 @@ defmodule Pleroma.Stats do
alias Pleroma.Repo
alias Pleroma.User
def start_link do
use Agent
def start_link(_) do
agent = Agent.start_link(fn -> {[], %{}} end, name: __MODULE__)
spawn(fn -> schedule_update() end)
agent