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.9]
- Large rework of
await AsyncResult.get()
- Works much better than earlier, but it's crap still
- Added outnumber of monkey-patches
- Fixed race condition on first microseconds of pool shutdown
[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.9.tar.gz
(14.1 kB
view hashes)
Built Distribution
Close
Hashes for celery-pool-asyncio-0.1.9.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 775d86d1b108308edeb08b0c7663fddcc9e532f749210935c43a480157fa84bd |
|
MD5 | 5ce0485134c5dc5030927a43859eca9d |
|
BLAKE2b-256 | 0d14060ae69e124b4b9912d2be9124f5c23ed2a64f78c169cefc1950c366d79d |
Close
Hashes for celery_pool_asyncio-0.1.9-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fabac6f566b54f3dc7c0b79fa1ef90af0a6a43d0401927ecaca225bb862faee8 |
|
MD5 | f8fe65d14e74c85d67ab341dc6219666 |
|
BLAKE2b-256 | a6b01c46122a403ac0b057f7de5620d7da7006fcea6f3b99d91dca3022d4ee25 |