Skip to main content

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for celery-pool-asyncio, version 0.1.1
Filename, size File type Python version Upload date Hashes
Filename, size celery_pool_asyncio-0.1.1-py2.py3-none-any.whl (7.4 kB) File type Wheel Python version py2.py3 Upload date Hashes View hashes
Filename, size celery-pool-asyncio-0.1.1.tar.gz (10.6 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page