{"id":13471197,"url":"https://github.com/rq/rq","last_synced_at":"2025-12-16T01:15:30.704Z","repository":{"id":1846845,"uuid":"2771544","full_name":"rq/rq","owner":"rq","description":"Simple job queues for Python","archived":false,"fork":false,"pushed_at":"2025-04-26T13:50:47.000Z","size":3851,"stargazers_count":10144,"open_issues_count":234,"forks_count":1434,"subscribers_count":203,"default_branch":"master","last_synced_at":"2025-05-05T14:14:43.415Z","etag":null,"topics":["async","background-jobs","delayed-jobs","delayed-tasks","job-queue","python","redis","rq","task","task-queue","workers"],"latest_commit_sha":null,"homepage":"https://python-rq.org","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"bestmomo/laravel5-example","license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rq.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGES.md","contributing":null,"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,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"github":["selwin"],"patreon":null,"open_collective":null,"ko_fi":null,"tidelift":"pypi/rq","community_bridge":null,"custom":null,"polar":"selwin"}},"created_at":"2011-11-14T10:53:48.000Z","updated_at":"2025-05-05T07:37:29.000Z","dependencies_parsed_at":"2023-07-05T18:01:46.121Z","dependency_job_id":"dd5187fc-7b42-45f7-b5c3-1f89f7aa64b5","html_url":"https://github.com/rq/rq","commit_stats":{"total_commits":1463,"total_committers":292,"mean_commits":5.010273972602739,"dds":0.6534518113465482,"last_synced_commit":"4073aa364283b52d8a255ae74179a452daa3a903"},"previous_names":["nvie/rq"],"tags_count":85,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rq%2Frq","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rq%2Frq/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rq%2Frq/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rq%2Frq/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rq","download_url":"https://codeload.github.com/rq/rq/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253592891,"owners_count":21932900,"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":["async","background-jobs","delayed-jobs","delayed-tasks","job-queue","python","redis","rq","task","task-queue","workers"],"created_at":"2024-07-31T16:00:41.442Z","updated_at":"2025-12-16T01:15:30.644Z","avatar_url":"https://github.com/rq.png","language":"Python","readme":"RQ (_Redis Queue_) is a simple Python library for queueing jobs and processing\nthem in the background with workers. It is backed by Redis or Valkey and is designed\nto have a low barrier to entry while scaling incredibly well for large applications.\nIt can be integrated into your web stack easily, making it suitable for projects\nof any size—from simple applications to high-volume enterprise systems.\n\nRQ requires Redis \u003e= 4 or Valkey \u003e= 7.2.\n\n[![Build status](https://github.com/rq/rq/workflows/Test/badge.svg)](https://github.com/rq/rq/actions?query=workflow%3A%22Test%22)\n[![PyPI](https://img.shields.io/pypi/pyversions/rq.svg)](https://pypi.python.org/pypi/rq)\n[![Coverage](https://codecov.io/gh/rq/rq/branch/master/graph/badge.svg)](https://codecov.io/gh/rq/rq)\n[![Code style: Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)\n\n\nFull documentation can be found [here][d].\n\n\n## Support RQ\n\nIf you find RQ useful, please consider supporting this project via [Tidelift](https://tidelift.com/subscription/pkg/pypi-rq?utm_source=pypi-rq\u0026utm_medium=referral\u0026utm_campaign=readme).\n\n\n## Getting started\n\nFirst, run a Redis server, of course:\n\n```console\n$ redis-server\n```\n\nTo put jobs on queues, you don't have to do anything special, just define\nyour typically lengthy or blocking function:\n\n```python\nimport requests\n\ndef count_words_at_url(url):\n    \"\"\"Just an example function that's called async.\"\"\"\n    resp = requests.get(url)\n    return len(resp.text.split())\n```\n\nThen, create an RQ queue:\n\n```python\nfrom redis import Redis\nfrom rq import Queue\n\nqueue = Queue(connection=Redis())\n```\n\nAnd enqueue the function call:\n\n```python\nfrom my_module import count_words_at_url\njob = queue.enqueue(count_words_at_url, 'http://nvie.com')\n```\n\n## Scheduling Jobs\n\nScheduling jobs is also easy:\n\n```python\n# Schedule job to run at 9:15, October 10th\njob = queue.enqueue_at(datetime(2019, 10, 10, 9, 15), say_hello)\n\n# Schedule job to run in 10 seconds\njob = queue.enqueue_in(timedelta(seconds=10), say_hello)\n```\n\n## Repeating Jobs\n\nTo execute a `Job` multiple times, use the `Repeat` class:\n\n```python\nfrom rq import Queue, Repeat\n\n# Repeat job 3 times after successful execution, with 30 second intervals\nqueue.enqueue(my_function, repeat=Repeat(times=3, interval=30))\n\n# Repeat job 3 times with different intervals between runs\nqueue.enqueue(my_function, repeat=Repeat(times=3, interval=[5, 10, 15]))\n```\n\n## Retrying Failed Jobs\n\nRetrying failed jobs is also supported:\n\n```python\nfrom rq import Retry\n\n# Retry up to 3 times, failed job will be requeued immediately\nqueue.enqueue(say_hello, retry=Retry(max=3))\n\n# Retry up to 3 times, with configurable intervals between retries\nqueue.enqueue(say_hello, retry=Retry(max=3, interval=[10, 30, 60]))\n```\n\nFor a more complete example, refer to the [docs][d].  But this is the essence.\n\n\n### The Worker\n\nTo start executing enqueued function calls in the background, start a worker\nfrom your project's directory:\n\n```console\n$ rq worker --with-scheduler\n*** Listening for work on default\nGot count_words_at_url('http://nvie.com') from default\nJob result = 818\n*** Listening for work on default\n```\n\nTo run multiple workers in production, use process managers like `systemd`. RQ also ships with a beta version of `worker-pool` that lets you run multiple worker processes with a single command.\n\n```console\nrq worker-pool -n 4\n```\n\nMore options are documented on [python-rq.org](https://python-rq.org/docs/workers/).\n\n\n## Installation\n\nSimply use the following command to install the latest released version:\n\n    pip install rq\n\nIf you want the cutting edge version (that may well be broken), use this:\n\n    pip install git+https://github.com/rq/rq.git@master#egg=rq\n\n\n## Docs\n\nTo build and run the docs, install [jekyll](https://jekyllrb.com/docs/) and run:\n\n```shell\ncd docs\njekyll serve\n```\n\n## Related Projects\n\nIf you use RQ, Check out these below repos which might be useful in your rq based project.\n\n- [django-rq](https://github.com/rq/django-rq)\n- [rq-dashboard](https://github.com/Parallels/rq-dashboard)\n- [rqmonitor](https://github.com/pranavgupta1234/rqmonitor)\n- [Flask-RQ2](https://github.com/rq/Flask-RQ2)\n- [rq-scheduler](https://github.com/rq/rq-scheduler)\n- [rq-dashboard-fastAPI](https://github.com/Hannes221/rq-dashboard-fast)\n\n\n\n## Project history\n\nThis project has been inspired by the good parts of [Celery][1], [Resque][2]\nand [this snippet][3], and has been created as a lightweight alternative to the\nheaviness of Celery or other AMQP-based queueing implementations.\n\nRQ is maintained by [Stamps](https://stamps.id), an Indonesian based company that provides enterprise grade CRM and order management systems.\n\n\n[d]: http://python-rq.org/\n[m]: http://pypi.python.org/pypi/mailer\n[p]: http://docs.python.org/library/pickle.html\n[1]: http://docs.celeryq.dev/\n[2]: https://github.com/resque/resque\n[3]: https://github.com/fengsp/flask-snippets/blob/1f65833a4291c5b833b195a09c365aa815baea4e/utilities/rq.py\n","funding_links":["https://github.com/sponsors/selwin","https://tidelift.com/funding/github/pypi/rq","https://polar.sh/selwin","https://tidelift.com/subscription/pkg/pypi-rq?utm_source=pypi-rq\u0026utm_medium=referral\u0026utm_campaign=readme"],"categories":["Uncategorized","Task Queues","Python","Queue","Open Source","DevOps","任务队列","编程语言","Caching \u0026 Queues","Analogues","数据管道和流处理","HarmonyOS","队列","Data Pipelines \u0026 Streaming","Task Queues [🔝](#readme)","Background Jobs \u0026 Task Queues","Task Queues \u0026 Background Jobs"],"sub_categories":["Uncategorized","Packages","Message Queues","Data Management","Python","Java","Windows Manager","ASGI Servers","Test Runners"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frq%2Frq","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frq%2Frq","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frq%2Frq/lists"}