{"id":22157996,"url":"https://github.com/qratorlabs/aio-job-queue","last_synced_at":"2025-07-26T08:32:15.757Z","repository":{"id":137989243,"uuid":"171251184","full_name":"QratorLabs/aio-job-queue","owner":"QratorLabs","description":null,"archived":false,"fork":false,"pushed_at":"2019-05-18T18:48:17.000Z","size":21,"stargazers_count":4,"open_issues_count":6,"forks_count":4,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-06-01T04:13:11.775Z","etag":null,"topics":["async","asyncio","python","python3","python3-library","queue","queue-manager","queue-tasks","queueing","queues","redis"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/QratorLabs.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2019-02-18T09:12:39.000Z","updated_at":"2022-05-12T15:42:44.000Z","dependencies_parsed_at":null,"dependency_job_id":"a6cca567-a96e-4fc9-9718-0511fa65a044","html_url":"https://github.com/QratorLabs/aio-job-queue","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/QratorLabs/aio-job-queue","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/QratorLabs%2Faio-job-queue","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/QratorLabs%2Faio-job-queue/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/QratorLabs%2Faio-job-queue/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/QratorLabs%2Faio-job-queue/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/QratorLabs","download_url":"https://codeload.github.com/QratorLabs/aio-job-queue/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/QratorLabs%2Faio-job-queue/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267140648,"owners_count":24041970,"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-26T02:00:08.937Z","response_time":62,"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":["async","asyncio","python","python3","python3-library","queue","queue-manager","queue-tasks","queueing","queues","redis"],"created_at":"2024-12-02T03:16:49.564Z","updated_at":"2025-07-26T08:32:15.742Z","avatar_url":"https://github.com/QratorLabs.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Reliable queue implementation with Redis backend and python-asyncio client\n\n## Requirements:\n\n- python3.5\n- aioredis (we only need `Redis` object with awaitable methods)\n\n## Basic usage:\n\n`Redis` object should be created before `Queue` init. This way you may use the\nsame connecton to Redis for different purposes in your program.\n\n```python\nimport asyncio\nimport aioredis\nimport aioredisqueue\n\nloop = asyncio.get_event_loop()\n\nasync def process_jobs():\n    redis = await aioredis.create_reconnecting_redis(...)\n    queue = aioredisqueue.Queue(redis)\n    await q.put(b'abc')\n\n    task = await q.get()\n    print(task.payload)\n\n    await task.ack()\n\n\nloop.run_until_complete(process_jobs)\n```\n\n## Serialization methods:\n\nThere are several serialization methods available by default : `json`, `pickle`\n(default), `raw`. If `pyyaml` library is installed, `yaml` can be used as well.\nIf `serialization_method` is specified when initializing `Queue`, it is used\nfor all the tasks created in the queue. It can be also overridden for \neach task in `Queue.put()`.\n\nCustom serialization methods can be registered. To do it one needs to\nprovide two callables, one for decoding the payload from binary \nrepresentation and one for encoding. A very naive example that works in \nPython3.6+ (by default we encode and decode JSON strings to and from bytes):\n\n```python\nfrom aioredisqueue.serializers import register\n\nregister(\n    'my_json',\n    json.loads,\n    lambda obj: json.dumps(obj, ensure_ascii=False).encode('utf8'),\n)\n```\n\n\n## Non-standard features:\n\nAll methods are coroutines, even `get_nowait`. That's because calls to redis are\nperformed during each such call.\n\n## What can change soon\n\n### API changes\n- `loop` may be deleted from constructor params\n\n### New features\n- `max_items` limit support: current version of `put` method will\n  be renamed into `put_nowait`.\n- `get_multi` and `put_multi` methods, allowing getting and putting multiple\n  items from queue with one call\n- method for periodical requeueing of not acknowledged tasks\n- keeping track of times a task was requeued, dropping too old tasks or tasks\n  with too many retries.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fqratorlabs%2Faio-job-queue","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fqratorlabs%2Faio-job-queue","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fqratorlabs%2Faio-job-queue/lists"}