DripDrop.Dispatch.Concurrency (DripDrop v0.1.0)

Copy Markdown View Source

Limits in-flight dispatches by channel and adapter.

The gate is intentionally database-backed so all worker runtimes see the same concurrency counts. Advisory transaction locks serialize cap checks per scope, and hits defer the execution instead of failing it.

Summary

Functions

Checks configured concurrency caps for the dispatch context and adapter.

Functions

check(context, adapter)

@spec check(map(), map()) :: :ok | {:defer, DateTime.t(), map()} | {:error, term()}

Checks configured concurrency caps for the dispatch context and adapter.