# `PgFlow.Supervisor`
[🔗](https://github.com/agoodway/pgflow/blob/v0.1.0/lib/pgflow/supervisor.ex#L1)

Main supervisor for PgFlow components.

This supervisor is started by `PgFlow.start_link/1` and manages the core
PgFlow processes including:

- TaskSupervisor - Supervises async task execution
- WorkerSupervisor - Supervises flow workers
- StalledTaskRecovery - Recovers orphaned tasks

## Supervision Tree

    PgFlow.Supervisor
    ├── Task.Supervisor (PgFlow.TaskSupervisor)
    ├── PgFlow.WorkerSupervisor
    └── PgFlow.Worker.StalledTaskRecovery

# `child_spec`

Returns a specification to start this module under a supervisor.

See `Supervisor`.

# `start_link`

```elixir
@spec start_link(keyword()) :: Supervisor.on_start()
```

Starts the PgFlow supervisor with the given configuration.

The configuration should be validated using `PgFlow.Config.validate!/1`.

## Examples

    config = PgFlow.Config.validate!(repo: MyApp.Repo, flows: [MyFlow])
    {:ok, pid} = PgFlow.Supervisor.start_link(config)

---

*Consult [api-reference.md](api-reference.md) for complete listing*
