# `Cauldron2D.Arenas.Sweeper`
[🔗](https://github.com/jaman/cauldron/blob/v0.1.3/cauldron_2d/lib/cauldron_2d/arenas/sweeper.ex#L1)

Stops arenas that have had no human in them for a while; they start again on the
next use of their world's name. Each sweep also seats the children a running arena
is short of (`Cauldron2D.Arenas.reseat/1`).

    Cauldron2D.Arenas.Sweeper.start_link(idle_after: 120, every: 30)

## Options

  * `:idle_after` — seconds without a human before an arena is stopped. Default `120`
  * `:every` — seconds between sweeps, or `:never` to sweep only on `sweep/1`. Default `30`
  * `:name` — the process name. Default the module, `nil` for none

# `child_spec`

Returns a specification to start this module under a supervisor.

See `Supervisor`.

# `start_link`

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

Start the sweeper.

# `sweep`

```elixir
@spec sweep(GenServer.server()) :: :ok
```

Sweep now: seat missing children, note which running arenas are without humans and stop those idle long enough.

---

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