ChromicPDF v0.4.0 ChromicPDF.Supervisor View Source

Use this for multiple ChromicPDF instances.

When is this useful?

  • You want to completely separate two or more PDF "queues"
  • You want to give your PDF module a custom API

Usage

defmodule MyApp.MyPDFGenerator do
  use ChromicPDF.Supervisor
end

def MyApp.Application do
  def start(_type, _args) do
    children = [
      MyApp.MyPDFGenerator
    ]

    Supervisor.start_link(children, strategy: :one_for_one, name: MyApp.Supervisor)
  end
end