Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

implement task.apply #70

Open
felipao-mx opened this issue Jan 21, 2022 · 0 comments
Open

implement task.apply #70

felipao-mx opened this issue Jan 21, 2022 · 0 comments
Assignees

Comments

@felipao-mx
Copy link
Member

felipao-mx commented Jan 21, 2022

make able to call tasks asynchronously as follows (based on Celery tasks apply function):

from fast_agave.tasks import task

# Task definition
@task(QUEUE_NAME=...)
async def my_task(message: Dict) -> None:
   ...


# task invocation

my_task.apply(dict(foo='bar'))

apply function should create a asyncio.Task and submit the the message to the queue associated in the task definition so we can do "fire and forget"

@felipao-mx felipao-mx self-assigned this Jan 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant