Celery pool to run coroutine tasks
Project description
Celery Pool AsyncIO
- Free software: Apache Software License 2.0
Features
import asyncio
from celery import Celery
app = Celery()
@app.task(
bind=True,
soft_time_limit=None, # temporary unimplemented. You can help me
time_limit=300, # raises futures.TimeoutError on timeout
)
async def my_task(self, *args, **kwargs):
await asyncio.sleep(5)
@app.task
async def my_simple_task(*args, **kwargs):
await asyncio.sleep(5)
Then run celery:
$ celery worker -A hello_async_celery.app -P celery_pool_asyncio:TaskPool
Changelog
[0.1.8]
- Cleanup tracer, use celery.app.trace namespase where it possible
[0.1.7]
- Refactor monkey, split it
- Move patch_send_task to own function
- Add patch_result_get to await AsyncResult.get
[0.1.6]
- Avoid building trace twice
- Also this small performance optimization fixed AsyncResult.get
[0.1.5]
- Fix graceful shutdown
[0.1.4]
- Fix monkey: another function must be patched
[0.1.3]
- Add changelog
- Append documentation
[0.1.2]
- Add monkey patcher to make brocker IO operations nonblocking
[0.1.1]
- Refactor code
- Fix found errors
[0.1.0]
- Initial commit
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
celery-pool-asyncio-0.1.8.tar.gz
(11.2 kB
view hashes)
Built Distribution
Close
Hashes for celery-pool-asyncio-0.1.8.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 16b768e56524894614f52ac56914adda50caf8f995dff9ebc7c36565f51ca354 |
|
MD5 | 856a5f29cf25492e3ba1731a9dc4c267 |
|
BLAKE2b-256 | bea83023b44911f3dbbceb57a8038aaabc1d32e31c1feb967f05efed4bd55b13 |
Close
Hashes for celery_pool_asyncio-0.1.8-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 640951d0b2bc8a4b17b88d089dcddbea927213f2037d3a9de2aaeaf5a6bbb038 |
|
MD5 | 7ff0c326fe26b2618276273923664ecd |
|
BLAKE2b-256 | ff409d7066ba4010370fd60b44a45e658dccb6970d1e9ba87d719b379470c9ad |