Packages

Slack Web API wrapper library that automatically throttles all requests according to API rate limits.

Current section

Files

Jump to
slack_throttle lib slack queue supervisor.ex
Raw

lib/slack/queue/supervisor.ex

defmodule SlackThrottle.Queue.Supervisor do
@moduledoc false
use Supervisor
@name SlackThrottle.Queue.Supervisor
def start_link do
Supervisor.start_link(__MODULE__, :ok, name: @name)
end
def start_queue do
Supervisor.start_child(@name, [])
end
def init(:ok) do
children = [
worker(SlackThrottle.Queue.Worker, [], restart: :temporary)
]
supervise(children, strategy: :simple_one_for_one)
end
end