Files
fastapi_best_architecture/backend/app/task/celery_task/tasks.py
Wu Clan fc5a0f9dfa Update the celery configuration and tasks (#458)
* Update the celery configuration and tasks

* fix message notifications
2024-11-15 14:29:02 +08:00

12 lines
242 B
Python

#!/usr/bin/env python3
# -*- coding: utf-8 -*-
from anyio import sleep
from backend.app.task.celery import celery_app
@celery_app.task(name='task_demo_async')
async def task_demo_async() -> str:
await sleep(10)
return 'test async'