Skip to main content

Celery pool to run coroutine tasks

Project description

Celery Pool AsyncIO

Logo

  • 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.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


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.4.tar.gz (11.1 kB view hashes)

Uploaded Source

Built Distribution

celery_pool_asyncio-0.1.4-py2.py3-none-any.whl (8.0 kB view hashes)

Uploaded Python 2 Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page