{"id":15009825,"url":"https://github.com/kai3341/celery-pool-asyncio","last_synced_at":"2025-10-03T19:30:20.999Z","repository":{"id":35068658,"uuid":"198568368","full_name":"kai3341/celery-pool-asyncio","owner":"kai3341","description":"Celery pool to run coroutine tasks","archived":true,"fork":true,"pushed_at":"2022-04-18T00:57:03.000Z","size":155,"stargazers_count":108,"open_issues_count":13,"forks_count":12,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-09-30T07:27:32.913Z","etag":null,"topics":["asyncio","background-jobs","celery","concurrency","coroutines","pool","python3"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/celery-pool-asyncio/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"getninjas/celery-executor","license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kai3341.png","metadata":{"files":{"readme":"README.md","changelog":"HISTORY.md","contributing":"docs/contributing.rst","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-07-24T06:01:16.000Z","updated_at":"2025-06-03T03:13:57.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/kai3341/celery-pool-asyncio","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/kai3341/celery-pool-asyncio","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kai3341%2Fcelery-pool-asyncio","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kai3341%2Fcelery-pool-asyncio/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kai3341%2Fcelery-pool-asyncio/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kai3341%2Fcelery-pool-asyncio/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kai3341","download_url":"https://codeload.github.com/kai3341/celery-pool-asyncio/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kai3341%2Fcelery-pool-asyncio/sbom","scorecard":{"id":547483,"data":{"date":"2025-08-11","repo":{"name":"github.com/kai3341/celery-pool-asyncio","commit":"f37af4f32646ad2c5a148969f85396c74782a45d"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.6,"checks":[{"name":"Code-Review","score":6,"reason":"Found 10/15 approved changesets -- score normalized to 6","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Maintained","score":0,"reason":"project is archived","details":["Warn: Repository is archived."],"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":9,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Warn: project license file does not contain an FSF or OSI license."],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Vulnerabilities","score":1,"reason":"9 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: PYSEC-2021-858 / GHSA-q4xr-rc97-m4xx","Warn: Project is vulnerable to: PYSEC-2022-42991 / GHSA-v3c5-jqr6-7qm8","Warn: Project is vulnerable to: PYSEC-2021-437 / GHSA-5xp3-jfq3-5q8x","Warn: Project is vulnerable to: PYSEC-2020-173 / GHSA-gpvv-69j7-gwj8","Warn: Project is vulnerable to: PYSEC-2023-228 / GHSA-mq26-g339-26xf","Warn: Project is vulnerable to: PYSEC-2025-49 / GHSA-5rjg-fvgr-3xxf","Warn: Project is vulnerable to: GHSA-cx63-2mw6-8hw5","Warn: Project is vulnerable to: PYSEC-2022-43012 / GHSA-r9hx-vwmv-q579","Warn: Project is vulnerable to: PYSEC-2022-43017 / GHSA-qwmp-2cf2-g9g6"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 30 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-20T09:54:32.725Z","repository_id":35068658,"created_at":"2025-08-20T09:54:32.725Z","updated_at":"2025-08-20T09:54:32.725Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278217052,"owners_count":25950032,"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-10-03T02:00:06.070Z","response_time":53,"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":["asyncio","background-jobs","celery","concurrency","coroutines","pool","python3"],"created_at":"2024-09-24T19:28:48.686Z","updated_at":"2025-10-03T19:30:20.700Z","avatar_url":"https://github.com/kai3341.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"Celery Pool AsyncIO\n===============\n\n![python](https://img.shields.io/pypi/pyversions/celery-pool-asyncio.svg)\n![version](https://img.shields.io/pypi/v/celery-pool-asyncio.svg)\n![downloads](https://img.shields.io/pypi/dm/celery-pool-asyncio.svg)\n![format](https://img.shields.io/pypi/format/celery-pool-asyncio.svg)\n\n\n![Logo](https://repository-images.githubusercontent.com/198568368/35298e00-c1e8-11e9-8bcf-76c57ee28db8)\n\n* Free software: Apache Software License 2.0\n\nFeatures\n--------\n\n\n```\nimport asyncio\nfrom celery import Celery\n\n# celery_pool_asyncio importing is optional\n# It imports when you run worker or beat if you define pool or scheduler\n# but it does not imports when you open REPL or when you run web application.\n# If you want to apply monkey patches anyway to make identical environment\n# when you use REPL or run web application app it's good idea to import\n# celery_pool_asyncio module\nimport celery_pool_asyncio  # noqa\n# Sometimes noqa does not disable linter (Spyder IDE)\ncelery_pool_asyncio.__package__\n\n\napp = Celery()\n\n\n@app.task(\n    bind=True,\n    soft_time_limit=42,  # raises celery.exceptions.SoftTimeLimitExceeded inside the coroutine\n    time_limit=300,  # breaks coroutine execution\n)\nasync def my_task(self, *args, **kwargs):\n    await asyncio.sleep(5)\n\n\n@app.task\nasync def my_simple_task(*args, **kwargs):\n    await asyncio.sleep(5)\n```\n\nThen run celery:\n\n```\n$ celery worker -A hello_async_celery.app -P celery_pool_asyncio:TaskPool\n```\n\nMonkey patching: wtf and why\n--------\n\nThere are many monkey patches should be applied to make application working, and\nsome of them should be applied as early as possible. You are able to switch off\nany of them by setting environment variable `CPA_MONKEY_DENY`. Remember you\nshould have a great reason to do it.\n\nExcept critical for work features it allows:\n```\n# await data sending to broker\nasync_result = await my_simple_task.delay()\n\n# await wainting for AsyncResult\nresult = await async_result.get()\n```\n\nYou can manually disable any of them by enumerating it comma separated:\n```\n$ env CPA_MONKEY_DENY=CELERY.SEND_TASK,ALL_BACKENDS celery worker -A hello_async_celery.app -P celery_pool_asyncio:TaskPool\n```\n\nDisabling is available for:\n- `SIGNAL.SEND`\n- `CELERY.SEND_TASK`\n- `WORKCONTROLLER.USE_EVENTLOOP`\n- `WORKER.CPU_COUNT`\n- `BASERESULTCONSUMER.WAIT_FOR_PENDING`\n- `BASERESULTCONSUMER.DRAIN_EVENTS_UNTIL`\n- `ASYNCBACKENDMIXIN.WAIT_FOR_PENDING`\n- `ALL_BACKENDS`\n- `BEAT.SERVICE.START`\n- `BEAT.SERVICE.STOP`\n- `BUILD_TRACER`\n- `KOMBU.UTILS.COMPAT`\n- `RPC.RESULTCONSUMER.DRAIN_EVENTS`\n- `AMQPBACKEND.DRAIN_EVENTS`\n- `AMQPBACKEND.GET_MANY`\n- `AMQP_BACKEND`\n- `RPC_BACKEND`\n\n\n[Scheduling](https://docs.celeryproject.org/en/latest/userguide/periodic-tasks.html#starting-the-scheduler)\n--------\n\nDefault scheduler doesn't work. `PersistentScheduler` is subclass of default\ncelery scheduler.\n\nRunning celery with scheduler:\n```\n$ celery worker -A hello_async_celery.app -P celery_pool_asyncio:TaskPool --scheduler celery_pool_asyncio:PersistentScheduler\n$ celery beat -A hello_async_celery.app --scheduler celery_pool_asyncio:PersistentScheduler\n```\n\nEmbeding also supported:\n```\n$ celery worker -A hello_async_celery.app -P celery_pool_asyncio:TaskPool --scheduler celery_pool_asyncio:PersistentScheduler -B\n```\n\nWARNING: embeded scheduler startup is not stable. It starts correctly in ~50%\nof cases. It looks like race condition. But after correct startup it works well.\nThat's why it's good idea to run scheduler in separated process.\n\n\n[Celery Signals](https://docs.celeryproject.org/en/stable/userguide/signals.html)\n--------\n```\nfrom celery.signals import worker_init, worker_shutting_down\n\n\n@worker_init.connect\nasync def do_startup_async(sender, **kwargs):\n    # Coroutine functions are available after pool initialized\n    await MyClass.init_async()\n\n\n@worker_init.connect\ndef do_startup(sender, **kwargs):\n    # regular functions are available too\n    pass\n\n\n@worker_shutting_down.connect\nasync def do_shutdown(sender=None, **kwargs):\n    await MyClass.shutdown()\n```\n\nMore examples\n--------\nThere is an example project uses [celery-pool-asyncio](https://github.com/kai3341/celery-decorator-taskcls-example).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkai3341%2Fcelery-pool-asyncio","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkai3341%2Fcelery-pool-asyncio","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkai3341%2Fcelery-pool-asyncio/lists"}