{"id":18365390,"url":"https://github.com/le0pard/redis_pool","last_synced_at":"2025-07-31T06:33:30.737Z","repository":{"id":14796241,"uuid":"17518353","full_name":"le0pard/redis_pool","owner":"le0pard","description":"Redis pool for Elixir lang","archived":false,"fork":false,"pushed_at":"2018-05-08T20:47:19.000Z","size":35,"stargazers_count":21,"open_issues_count":0,"forks_count":4,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-06T16:39:27.664Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://leopard.in.ua/redis_pool/","language":"Elixir","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"mateagar/Color-Picker-for-iOS","license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/le0pard.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-03-07T15:31:53.000Z","updated_at":"2023-09-01T08:52:20.000Z","dependencies_parsed_at":"2022-09-16T03:50:33.536Z","dependency_job_id":null,"html_url":"https://github.com/le0pard/redis_pool","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/le0pard/redis_pool","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/le0pard%2Fredis_pool","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/le0pard%2Fredis_pool/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/le0pard%2Fredis_pool/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/le0pard%2Fredis_pool/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/le0pard","download_url":"https://codeload.github.com/le0pard/redis_pool/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/le0pard%2Fredis_pool/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267998070,"owners_count":24178449,"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","status":"online","status_checked_at":"2025-07-31T02:00:08.723Z","response_time":66,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":[],"created_at":"2024-11-05T23:13:20.612Z","updated_at":"2025-07-31T06:33:30.687Z","avatar_url":"https://github.com/le0pard.png","language":"Elixir","funding_links":[],"categories":[],"sub_categories":[],"readme":"# RedisPool for Elixir\n[![Build Status](https://travis-ci.org/le0pard/redis_pool.png?branch=master)](https://travis-ci.org/le0pard/redis_pool)\n\nThis is redis pool for [Elixir](http://elixir-lang.org/). Build on top of [eredis](https://github.com/wooga/eredis) and [poolboy](https://github.com/devinus/poolboy).\n\n## Examples\n\nApplication start:\n\n```\nRedisPool.start\n```\nor add it in `application` section in mix:\n\n```\ndef application do\n  [mod: {Example, []},\n   applications: [ :redis_pool ] ]\nend\n```\n\n### Create pools\n\n```\nRedisPool.create_pool(:default, 10)\n\nRedisPool.create_pool(:test, 10, 'localhost', 6379)\n\nRedisPool.create_pool(:test2, 10, 'localhost', 6379, 0, 'password', 100)\n```\n\nAlso you can configure redis_pool directly from configuration file to get pools automatically created at application startup. In `config/config.exs`, add :\n\n```\nconfig :redis_pool, :pools, [\n  test_pool:   [size: 10],\n  test_pool_2: [size: 10, database: 111],\n  test_pool_3: [size: 20, host: '127.0.0.1', port: 6379, database: 'user_db', password: 'abc', reconnect_sleep: '20']\n]\n```\n\n### Delete pools\n\n```\nRedisPool.delete_pool(:default)\n\nRedisPool.delete_pool(:test)\n```\n\n### Usage\n\nUsage of pools:\n\n```\nRedisPool.q({:global, :default}, [\"SET\", \"foo\", \"bar\"])\n\nRedisPool.q({:global, :test}, [\"GET\", \"foo\"])\n```\n\nMethod `transaction` is execute all redis command between `MULTI` and `EXEC` commands:\n\n```\nRedisPool.transaction {:global, :redis}, fn(redis) -\u003e\n  :eredis.q redis, [\"SADD\", \"queues\", queue]\n  :eredis.q redis, [\"LPUSH\", \"queue\", \"Test\" ]\nend\n```\n\n## Contributing\n\n1. Fork it\n2. Create your feature branch (`git checkout -b my-new-feature`)\n3. Commit your changes (`git commit -am 'Add some feature'`)\n4. Push to the branch (`git push origin my-new-feature`)\n5. Create new Pull Request\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fle0pard%2Fredis_pool","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fle0pard%2Fredis_pool","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fle0pard%2Fredis_pool/lists"}