Skip to main content

Experimental task class that buffers messages and processes them as a list.

Project description

Celery Batches

https://img.shields.io/pypi/v/celery-batches.svg https://github.com/clokep/celery-batches/actions/workflows/main.yml/badge.svg Documentation Status

Celery Batches provides a Task class that allows processing of multiple Celery task calls together as a list. The buffer of tasks calls is flushed on a timer and based on the number of queued tasks.

Some potential use-cases for batching of task calls include:

  • De-duplicating tasks.

  • Accumlating / only handling the latest task with similar arguments.

  • Bulk inserting / updating of data.

  • Tasks with expensive setup that can run across a range of arguments.

What do I need?

celery-batches version runs on,

  • Python (3.7, 3.8, 3.9, 3.10)

  • PyPy3 (7.6)

And is tested with Celery >= 4.4.

If you’re running an older version of Python, you need to be running an older version of celery-batches:

  • Python 2.7: celery-batches 0.3.

  • Python 3.4: celery-batches 0.2.

  • Python 3.5: celery-batches 0.3.

  • Python 3.6: celery-batches 0.5.

If you’re running an older version of Celery, you need to be running an older version of celery-batches:

  • Celery < 4.0: Use celery.contrib.batches instead.

  • Celery 4.0 - 4.3: celery-batches 0.3.

History

Celery Batches was distributed as part of Celery (as celery.contrib.batches) until Celery 4.0. This project updates the Batches code to maintain compatiblity with newer versions of Celery and other fixes. See the Changelog for details.

Additionally, this repository includes the full history of the code from celery.contrib.batches, but rewritten to the celery_batches/__init__.py file.

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

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

celery_batches-0.7-py3-none-any.whl (8.5 kB view details)

Uploaded Python 3

File details

Details for the file celery-batches-0.7.tar.gz.

File metadata

  • Download URL: celery-batches-0.7.tar.gz
  • Upload date:
  • Size: 8.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.9.7

File hashes

Hashes for celery-batches-0.7.tar.gz
Algorithm Hash digest
SHA256 0a0f99073514e0fff3876b6da4ff0d784a91799367e54c5a4a49a75aaf056133
MD5 df9244cef004ba20ecbf064f37db4e7e
BLAKE2b-256 219d175ff4909bfc66237a97937adee70ab31cc3d6987599c2ef007f9a851ee2

See more details on using hashes here.

File details

Details for the file celery_batches-0.7-py3-none-any.whl.

File metadata

  • Download URL: celery_batches-0.7-py3-none-any.whl
  • Upload date:
  • Size: 8.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.9.7

File hashes

Hashes for celery_batches-0.7-py3-none-any.whl
Algorithm Hash digest
SHA256 3dfb40af6be51da418a86346fa5ed6dfcdf5b095e2f4f6a28467ae1c9c96c11b
MD5 d77d67937a0ea3b0cce32e0cc8053973
BLAKE2b-256 c81622b534525b5ab8b52e8ff3d7548d9c7b816f9238acd5af07d38ec2e37ae0

See more details on using hashes here.

Supported by

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