pythondjangocelerydelayzappa

How can I call delay task in Zappa Django?


In celery I can call task with <func_name>.delay().

How can I do it in Zappa?

I have task:

@task()
def task_name():
    pass

Solution

  • TL;DR;

    They are meant to different purposes. Celery is distributed task queue system. That's why you can delay tasks. They are sent to a queue to be processed later.

    On the other, hand Zappa enables you to deploy a serverless application on AWS Lambda.

    If you want to send a request to Zappa, you can do this as a normal endpoint request, but this is not a queue system.

    Introduction

    From Celery Documentation:

    Celery - Distributed Task Queue Celery is a simple, flexible, and reliable distributed system to process vast amounts of messages, while providing operations with the tools required to maintain such a system.

    From Zappa Documentation:

    Zappa makes it super easy to build and deploy server-less, event-driven Python applications (including, but not limited to, WSGI web apps) on AWS Lambda + API Gateway. Think of it as "serverless" web hosting for your Python apps. That means infinite scaling, zero downtime, zero maintenance - and at a fraction of the cost of your current deployments!

    Python Celery and Zappa serve different purposes in the context of web development and task management. Here’s a breakdown of their key differences:

    1. Purpose and Use Case

    2. Architecture

    3. Task Handling

    4. Scalability

    5. Deployment and Hosting

    6. Integration with AWS

    7. Common Use Cases

    Summary: