View Source ChromicPDF.Supervisor (ChromicPDF v1.17.0)
Use this for multiple ChromicPDF instances.
when-is-this-useful
When is this useful?
- You want to completely separate two or more PDF worker pools
- You want to give your PDF module a custom API
usage
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
Link to this section Summary
Functions
Fetches pids of the supervisor's services and passes them to the given callback function.
Link to this section Types
Link to this section Functions
@spec child_spec([ChromicPDF.global_option()]) :: Supervisor.child_spec()
Fetches pids of the supervisor's services and passes them to the given callback function.
If ChromicPDF has been configured to run in on_demand
mode, this will start a temporary
browser instance.