8000 Releases · general-CbIC/poolex · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Releases: general-CbIC/poolex

[1.3.0] Handle errors on a worker's start

26 Apr 06:30
Compare
Choose a tag to compare

What's Changed

Added

  • Added caching of the dependencies on CI (compilation speed up).

  • Added a new option failed_workers_retry_interval to the pool configuration. This option configures the millisecond interval between retry attempts for workers that failed to start. The value is 1 second by default. Example:

    Poolex.start_link(
      worker_module: SomeUnstableWorker,
      workers_count: 5,
      failed_workers_retry_interval: 3_000
    )

Changed

  • Due to the deprecation of support for Ubuntu 20.04 on GitHub Actions (read more here), bumped minimum required versions of Elixir to ~> 1.11 and Erlang/OTP to ~> 24.

Fixed

  • Fixed the MatchError on pool starting error that occurs with errors on the launch of workers (read more in issue).

Full Changelog: v1.2.1...v1.3.0

[1.2.1] Patch with some fixes

06 Apr 08:09
Compare
Choose a tag to compare

What's Changed

Fixed

  • Now the busy_worker will be restarted after the caller's death. Read more in issue.
  • The function add_idle_workers!/2 now provides new workers to waiting callers if they exist. Read more in issue.

Full Changelog: v1.2.0...v1.2.1

[1.2.0] `pool_id` fallbacks to `worker_module`

07 Jan 11:26
Compare
Choose a tag to compare

What's Changed

Added

  • Added Elixir 1.18.* support to CI.

Changed

  • Refactored tests with new ExUnit parameterize feature.
  • :pool_id is not required init option anymore. For now it is equal to worker_module option value.

Fixed

  • Functions Poolex.add_idle_workers!/2 and Poolex.remove_idle_workers!/2 now accept any value of type GenServer.name() as their first argument, instead of only atom().
  • Supressed Supervisor's error logs in tests.

Full Changelog: v1.1.0...v1.2.0

[1.1.0] Optimized monitoring and other improvements

08 Dec 15:03
Compare
Choose a tag to compare

What's Changed

Added

Changed

  • Monitoring implementation has been optimized by using a plain map instead of the Agent process.
  • Refactored State struct by adding a list of @enforced_keys. (Details)
  • Poolex processes now have higher priority. (Details)

Deprecated

  • Poolex.get_state/1 deprecated in favor of :sys.get_state/1.

New Contributors

Full Changelog: v1.0.0...v1.1.0

[1.0.0] Support any `GenServer.name()` as `pool_id`

23 Sep 14:02
Compare
Choose a tag to compare

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 valid GenServer.name(). For example, {:global, :biba} or {:via, Registry, {MyRegistry, "boba"}}.

[0.10.0] Change pool size in runtime

26 Aug 12:21
Compare
Choose a tag to compare

What's changed

Added

  • Added functions add_idle_workers!/2 and remove_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

24 Apr 09:01
Compare
Choose a tag to compare

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

30 Aug 13:29
Compare
Choose a tag to compare

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}.
  • Poolex.caller() type replaced with struct defined in Poolex.Caller.t().

    • Reason: We need to save unique caller references.
  • Poolex.run!/3 was removed in favor of Poolex.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

03 Aug 08:34
Compare
Choose a tag to compare

What's Changed

Fixed

  • Fixed a bug with workers stuck in busy status. Added caller monitoring. #56

[0.7.5] Fixed breaking bug

31 Jul 07:52
Compare
Choose a tag to compare

What's Changed

Fixed

  • Fixed breaking bug with releasing workers in #55. Version 0.7.4 retired.
0