Skip to main content

Library that provides a system to generate tasks producers and consumers with ease.

Project description

Version:
1.0.0
Status:
Production/Stable
Author:

José Antonio Perdiguero López

Library that provides a system to generate tasks producers and consumers with ease.

Quick start

  1. Install this package using pip:

    pip install task-dispatcher
  2. Decorate your functions as producer and consumer tasks:

    from task_dispatcher import consumer, producer
    
    
    @consumer
    def square(x):
        return x**2
    
    
    @producer
    def prod_function(n):
        for i in range(n):
            square.delay(i)

Consumer and Producer

This library provides convenient decorators for generating a task dispatcher system based on producer-consumer pattern. Decorated functions or methods acts as Celery tasks and can be called using his own syntax: Calling celery tasks. Also, it’s possible to compose these tasks using Celery Canvas.

Project details


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