# `Sig.BullMQ.Supervisor`
[🔗](https://github.com/peeeuzin/sig/blob/v0.1.0/lib/sig/bullmq/supervisor.ex#L1)

Starts the Redis connection and the BullMQ worker that process asynchronous
executions.

Add it to your application's supervision tree, after the repo configured
for Sig (see `Sig.Repo`), to run executions started with `async: true`:

    children = [
      MyApp.Repo,
      Sig.BullMQ.Supervisor
    ]

Run it on every node that should process workflow jobs. Nodes that only
enqueue jobs still need the Redis connection, so start the supervisor
there too (or start a `BullMQ.RedisConnection` named `:sig_redis`).

## Options

Each option falls back to the `:sig` application environment, then to a
default:

  * `:redis_url` - Redis URL. Config key `:redis_url`, default
    `"redis://localhost:6379"`.
  * `:queue_name` - BullMQ queue name. Config key `:bullmq_queue_name`,
    default `"sig_workflows"`.
  * `:concurrency` - number of jobs processed concurrently. Config key
    `:bullmq_concurrency`, default `5`.

    {Sig.BullMQ.Supervisor, redis_url: "redis://redis:6379", concurrency: 10}

# `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 supervisor. See the module docs for the options.

---

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