Releases: general-CbIC/poolex
[1.0.0] Support any `GenServer.name()` as `pool_id`
What's changed
Changed
- Monitoring implementation now uses
Agent
instead of:ets
. It's needed to be more flexible in pool naming. - The
pool_id
can now be any validGenServer.name()
. For example,{:global, :biba}
or{:via, Registry, {MyRegistry, "boba"}}
.
[0.10.0] Change pool size in runtime
What's changed
Added
- Added functions
add_idle_workers!/2
andremove_idle_workers!/2
for changing the count of idle workers in runtime.
Changed
- Refactored private
start_workers
function. It no longer accepts monitor_id as it already is in the state. - Updated
telemetry
dependency.
[0.9.0] Pool size metrics
What's Changed
Pool size metrics (using telemetry
) were added. How to use them is described here: Working with metrics guide.
To enable pool size metrics, you need to set the pool_size_metrics
parameter to true
on the pool initialization:
children = [
{Poolex,
pool_id: :worker_pool,
worker_module: SomeWorker,
workers_count: 5,
pool_size_metrics: true}
]
[0.8.0] Merge `run` interfaces
What's Changed
Breaking changes
-
Option
:timeout
renamed to:checkout_timeout
.-
Reason: This option configures only the waiting time for
worker
from the pool, not the task's work time. This naming should be more understandable on the call site.# Before Poolex.run(:my_awesome_pool, fn worker -> some_work(worker) end, timeout: 10_000) # After Poolex.run(:my_awesome_pool, fn worker -> some_work(worker) end, checkout_timeout: 10_000)
-
-
Poolex.run/3
returns tuple{:error, :checkout_timeout}
instead of:all_workers_are_busy
.- Reason: It is easier to understand the uniform format of the response from the function:
{:ok, result}
or{:error, reason}
.
- Reason: It is easier to understand the uniform format of the response from the function:
-
Poolex.caller()
type replaced with struct defined inPoolex.Caller.t()
.- Reason: We need to save unique caller references.
-
Poolex.run!/3
was removed in favor ofPoolex.run/3
. The new unified function returns{:ok, result}
or{:error, :checkout_timeout}
and not handles runtime errors anymore.- Reason: We should not catch errors in the caller process. The caller process itself must choose how to handle exceptions and exit signals.
Fixed
- Fixed a bug when workers get stuck in
busy
status after checkout timeout.
[0.7.6] Handling caller's death
[0.7.5] Fixed breaking bug
[0.7.4] Fixed processing of restarting a fallen worker
[0.7.3] Fixed bugs
What's Changed
Fixed
- Fixed a bug with an incorrect number of running workers when specifying a zero or negative number in the
workers_count
parameter by @alexcastano in #49
[0.7.2] Improve the shutdown process
What's Changed
Fixed
- Trap exit to shutdown correctly by @alexcastano in #46
Changed
- Implementation settings are stored in the pool process state instead of the ETS table. This makes the testing process easier and removes unnecessary entities.
New Contributors
- @alexcastano made their first contribution in #46
[0.7.1] Improve the shutdown process
Fixed
- Fix the shutdown process: stop workers before the pool. Issue: #44.