Skip to main content

Async Runner

Project description

Async Runner

https://img.shields.io/pypi/v/async_runner.svg https://img.shields.io/travis/vedarthk/async_runner.svg Documentation Status

Async runner is a thin wrapper over Celery API. This will enable control over failed messages by moving them to separate queue (generally queue_name_error) and also allows to retry the task with the help of retry policy.

More can be found at documentation: https://async_runner.readthedocs.org

from async_runner import async_runner
async_runner.send_task(
    task_fn=func,  # task function can be python module path
    queue='queue_name',  # name of the queue
    args=(arg1, arg2, arg3, ),  # tuple/list of positional arguments to task function
    kwargs={'name': 'parameter'},  # dictionary with key word arguments to task function
    options={
        'max_retries': 3,  # maximum number of times the task is retried
        'retry_policy': {
            'retry_interval': 12  # interval between retires (in seconds)
        }
    }
)

TODO: Decouple from Django

History

0.1.0 (2016-1-22)

  • First release on PyPI.

0.1.1 (2016-1-22)

  • Fix issues.

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

async_runner-0.1.4.tar.gz (14.2 kB view details)

Uploaded Source

File details

Details for the file async_runner-0.1.4.tar.gz.

File metadata

  • Download URL: async_runner-0.1.4.tar.gz
  • Upload date:
  • Size: 14.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for async_runner-0.1.4.tar.gz
Algorithm Hash digest
SHA256 a13a48e746ae31f30c36003484ba51d87ddf0cf0e33df9be7da8aa673a58aae6
MD5 24f382d73c24b7c15b0c11946ab90140
BLAKE2b-256 d3b236fecb885986bda6378ad8189c20e25212a3f44c405d3f200496011a29ab

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