Skip to content

Support async function #6552

@SeyyedKomeil

Description

@SeyyedKomeil

Checklist

  • I have checked the issues list
    for similar or identical feature requests.
  • I have checked the pull requests list
    for existing proposed implementations of this feature.
  • I have checked the commit log
    to find out if the if the same feature was already implemented in the
    master branch.
  • I have included all related issues and possible duplicate issues
    in this issue (If there are none, check this box anyway).

Brief Summary

Support async celery tasks & call async function in celery tasks

Design

async def foo(x, y):
    return x + y

@app.task(
    name='tasks.add',
    queue='custom',
    rate_limit='10/s',
)
async def add(x, y):
    await foo(x, y)

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions