Outbox.Application (Outbox v0.1.0-beta.1)

Copy Markdown View Source

Outbox's root supervisor.

Started by adding Outbox to the host application's supervision tree:

children = [
  MyApp.Repo,
  {Phoenix.PubSub, name: MyApp.PubSub},
  Outbox,
  MyAppWeb.Endpoint
]

Brings up Outbox.TaskSupervisor, the library-owned Oban instance Outbox.Oban (queues + cron baked in), and the dispatcher Outbox.Ticker.

When config :outbox, oban: MyApp.Oban is set, the library skips starting Outbox.Oban and reuses the host's instance — the host is responsible for declaring outbox and outbox_prune queues plus the Outbox.Pruner cron entry on that instance.

Summary

Functions

Returns a specification to start this module under a supervisor.

Computes the child spec list for the given opts. Exposed so tests can introspect the result without actually starting the tree.

Functions

child_spec(init_arg)

Returns a specification to start this module under a supervisor.

See Supervisor.

children(opts)

@spec children(keyword()) :: list()

Computes the child spec list for the given opts. Exposed so tests can introspect the result without actually starting the tree.

start_link(opts)