mirror of
https://github.com/fastapi-practices/fastapi_best_architecture.git
synced 2025-08-17 05:38:28 +08:00
16 lines
298 B
Python
16 lines
298 B
Python
#!/usr/bin/env python3
|
|
# -*- coding: utf-8 -*-
|
|
import sys
|
|
import uuid
|
|
|
|
sys.path.append('../../')
|
|
|
|
from backend.app.common.celery import celery_app # noqa: E402
|
|
|
|
|
|
@celery_app.task
|
|
def task_demo_async() -> str:
|
|
uid = uuid.uuid4().hex
|
|
print(f'异步任务 {uid} 执行成功')
|
|
return uid
|