Skip to main content

Celery pool to run coroutine tasks

This project has been archived.

The maintainers of this project have marked this project as archived. No new releases are expected.

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


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.7.tar.gz (11.5 kB view details)

Uploaded Source

Built Distribution

celery_pool_asyncio-0.1.7-py2.py3-none-any.whl (8.4 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file celery-pool-asyncio-0.1.7.tar.gz.

File metadata

  • Download URL: celery-pool-asyncio-0.1.7.tar.gz
  • Upload date:
  • Size: 11.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.4.2 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.3

File hashes

Hashes for celery-pool-asyncio-0.1.7.tar.gz
Algorithm Hash digest
SHA256 20867ed5a0807bef24106b21ea26103420925da7f407732000058503c3c4ee01
MD5 dbc31f146c97a274a61dbfccd5d7ddaa
BLAKE2b-256 8892310754eabbd8eb48bb1debb269f6d5ad64194d85d4a7785e552a51717515

See more details on using hashes here.

File details

Details for the file celery_pool_asyncio-0.1.7-py2.py3-none-any.whl.

File metadata

  • Download URL: celery_pool_asyncio-0.1.7-py2.py3-none-any.whl
  • Upload date:
  • Size: 8.4 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.4.2 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.3

File hashes

Hashes for celery_pool_asyncio-0.1.7-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 2165f8ef1fee14494523b9035bf3a4b438e254f13eda2b4f912cc458abae352d
MD5 6dd18085a5bc16767e31c975fdf47dd9
BLAKE2b-256 460ec4d3042baa974c230cbc170c763ebba40fb13ada8eb10306a81ba4229584

See more details on using hashes here.

Supported by

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