Skip to content

Instantly share code, notes, and snippets.

@marinho10
Last active February 15, 2019 10:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save marinho10/393c4733c956f0cf9e377b36c05d89e8 to your computer and use it in GitHub Desktop.
Save marinho10/393c4733c956f0cf9e377b36c05d89e8 to your computer and use it in GitHub Desktop.
defmodule MyApp.StarterWorker do
@moduledoc """
Start lost children
"""
use GenServer
def start_link() do
GenServer.start_link(__MODULE__, [])
end
def init(state) do
:ets.new(:task_backup, [:set, :public, :named_table])
MyApp.Supervisor.start_all_task_workers()
{:ok, state}
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment