{"id":13808460,"url":"https://github.com/general-CbIC/poolex","last_synced_at":"2025-05-14T02:31:53.254Z","repository":{"id":65436336,"uuid":"564219300","full_name":"general-CbIC/poolex","owner":"general-CbIC","description":"A library for managing pools of workers","archived":false,"fork":false,"pushed_at":"2024-04-18T13:57:09.000Z","size":189,"stargazers_count":36,"open_issues_count":2,"forks_count":3,"subscribers_count":2,"default_branch":"develop","last_synced_at":"2024-04-19T13:06:21.553Z","etag":null,"topics":["elixir","elixir-library","hacktoberfest","poolboy","worker-pool"],"latest_commit_sha":null,"homepage":"","language":"Elixir","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/general-CbIC.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"docs/CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null},"funding":{"github":"general-CbIC"}},"created_at":"2022-11-10T08:51:45.000Z","updated_at":"2024-04-23T12:09:49.713Z","dependencies_parsed_at":"2023-10-02T08:47:42.049Z","dependency_job_id":"7cd3d27e-663e-43b2-bea8-7a5f716acf76","html_url":"https://github.com/general-CbIC/poolex","commit_stats":{"total_commits":57,"total_committers":2,"mean_commits":28.5,"dds":"0.052631578947368474","last_synced_commit":"968058919d7f1775251aa4d7a9e265c5c49ab1c3"},"previous_names":[],"tags_count":25,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/general-CbIC%2Fpoolex","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/general-CbIC%2Fpoolex/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/general-CbIC%2Fpoolex/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/general-CbIC%2Fpoolex/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/general-CbIC","download_url":"https://codeload.github.com/general-CbIC/poolex/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225273240,"owners_count":17448073,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["elixir","elixir-library","hacktoberfest","poolboy","worker-pool"],"created_at":"2024-08-04T01:01:43.312Z","updated_at":"2025-05-14T02:31:53.242Z","avatar_url":"https://github.com/general-CbIC.png","language":"Elixir","funding_links":["https://github.com/sponsors/general-CbIC"],"categories":["Actors"],"sub_categories":[],"readme":"# Poolex\n\n![Build and tests workflow](https://github.com/general-CbIC/poolex/actions/workflows/ci-tests.yml/badge.svg)\n[![hex.pm version](https://img.shields.io/hexpm/v/poolex.svg?style=flat)](https://hex.pm/packages/poolex)\n[![Hex Docs](https://img.shields.io/badge/hex-docs-lightgreen.svg?style=flat)](https://hexdocs.pm/poolex/)\n[![License](https://img.shields.io/hexpm/l/poolex.svg?style=flat)](https://github.com/general-CbIC/poolex/blob/main/LICENSE)\n[![Total Download](https://img.shields.io/hexpm/dt/poolex.svg?style=flat)](https://hex.pm/packages/poolex)\n\nPoolex is a library for managing pools of workers. Inspired by [poolboy](https://github.com/devinus/poolboy).\n\n\u003e [!IMPORTANT]  \n\u003e Documentation on GitHub corresponds to the current branch. For stable versions' docs see [Hexdocs](https://hexdocs.pm/poolex/).\n\n## Table of Contents\n\n\u003cimg alt=\"Poolex logo\" src=\"https://raw.githubusercontent.com/general-CbIC/poolex/develop/assets/poolex.png\" width=\"250\" height=\"250\" align=\"right\"/\u003e\n\n- [Poolex](#poolex)\n  - [Table of Contents](#table-of-contents)\n  - [Features](#features)\n  - [Requirements](#requirements)\n  - [Installation](#installation)\n  - [Usage](#usage)\n  - [Guides](#guides)\n  - [Used by](#used-by)\n  - [Sponsored by](#sponsored-by)\n  - [Contributions](#contributions)\n\n## Features\n\nWith `poolex` you can:\n\n- Launch multiple pools of workers and then access the free ones from anywhere in the application.\n- Configure the pool to run additional temporary workers if the load increases.\n- Analyze and optimize your pool's production settings using metrics.\n- Use your implementations to define worker and caller processes access logic.\n\n**Why `poolex` instead of `poolboy`?**\n  \n- `poolex` is written in Elixir. This library is much more convenient to use in Elixir projects.\n- `poolboy` is a great library, but not actively maintained :crying_cat_face: ![Last poolboy commit](https://img.shields.io/github/last-commit/devinus/poolboy?style=flat)\n\n## Requirements\n\n| Library                                                  | Elixir     | Erlang/OTP |\n|----------------------------------------------------------|------------|------------|\n| from `0.1.0` to `1.2.1`                                  | `\u003e= 1.7`   | `\u003e= 22`    |\n| `1.3.0`                                                  | `\u003e= 1 .11` | `\u003e= 24`    |\n| `\u003e= 1.4.0` ([not released yet](https://github.com/general-CbIC/poolex/blob/develop/CHANGELOG.md#unreleased)) | `\u003e= 1.17`  | `\u003e= 25`    |\n\n## Installation\n\nAdd `:poolex` to your list of dependencies in `mix.exs`:\n\n```elixir\ndef deps do\n  [\n    {:poolex, \"~\u003e 1.0\"}\n  ]\nend\n```\n\n## Usage\n\nIn the most typical use of Poolex, you only need to start a pool of workers as a child of your application.\n\n```elixir\nchildren = [\n  {Poolex,\n    worker_module: SomeWorker,\n    workers_count: 5}\n]\n\nSupervisor.start_link(children, strategy: :one_for_one)\n```\n\nThen you can execute any code on the workers with `run/3`:\n\n```elixir\niex\u003e Poolex.run(SomeWorker, \u0026(is_pid?(\u00261)), checkout_timeout: 1_000)\n{:ok, true}\n```\n\nA detailed description of the available configuration or examples of use can be found in [documentation](https://hexdocs.pm/poolex/getting-started.html).\n\n## Guides\n\n- [Getting Started](https://hexdocs.pm/poolex/getting-started.html)\n  - [Starting pool of workers](https://hexdocs.pm/poolex/getting-started.html#starting-pool-of-workers)\n  - [Poolex configuration options](https://hexdocs.pm/poolex/getting-started.html#starting-pool-of-workers)\n  - [Working with the pool](https://hexdocs.pm/poolex/getting-started.html#working-with-the-pool)\n- [Migration from `:poolboy`](https://hexdocs.pm/poolex/migration-from-poolboy.html)\n- [Example of use](https://hexdocs.pm/poolex/example-of-use.html)\n  - [Defining the worker](https://hexdocs.pm/poolex/example-of-use.html#defining-the-worker)\n  - [Configuring Poolex](https://hexdocs.pm/poolex/example-of-use.html#configuring-poolex)\n  - [Using Poolex](https://hexdocs.pm/poolex/example-of-use.html#using-poolex)\n- [Working with metrics](https://hexdocs.pm/poolex/pool-metrics.html)\n  - [Pool size metrics](https://hexdocs.pm/poolex/pool-metrics.html#pool-size-metrics)\n  - [Integration with PromEx](https://hexdocs.pm/poolex/pool-metrics.html#integration-with-promex)\n- [Workers and callers implementations](https://hexdocs.pm/poolex/workers-and-callers-implementations.html)\n  - [Callers](https://hexdocs.pm/poolex/workers-and-callers-implementations.html#callers)\n  - [Workers](https://hexdocs.pm/poolex/workers-and-callers-implementations.html#workers)\n  - [Writing custom implementations](https://hexdocs.pm/poolex/workers-and-callers-implementations.html#writing-custom-implementations)\n\n## Used by\n\n[![Aviasales](https://raw.githubusercontent.com/general-CbIC/poolex/develop/assets/companies/aviasales_logo.svg)](https://aviasales.tp.st/VlJlf7Ar)\n\n## Sponsored by\n\n[![Sponsored by GitAds](https://gitads.dev/v1/ad-serve?source=general-cbic/poolex@github)](https://gitads.dev/v1/ad-track?source=general-cbic/poolex@github)\n\n## Contributions\n\nIf you feel something can be improved or have any questions about specific behaviors or pieces of implementation, please feel free to file an issue. Proposed changes should be taken to issues before any PRs to save time on code that might not be merged upstream.\n\nIf you are ready to change the project, please read the [Contributing guide](docs/CONTRIBUTING.md) first.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgeneral-CbIC%2Fpoolex","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgeneral-CbIC%2Fpoolex","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgeneral-CbIC%2Fpoolex/lists"}