mirror of
https://github.com/fastapi-practices/fastapi-best-architecture.git
synced 2026-09-21 13:12:24 +00:00
Add support for celery dynamic tasks (#715)
* Add support for celery dynamic tasks * Update the celery conf * Update the celery task tables name * Refactor the celery task-related interfaces * Optimize auto-discovery tasks * Remove redundant config * Refine the business codes * Optimize crontab validation returns * Update dependencies in pyproject toml * Fix some bugs * Update dependencies * Update the version to 1.7.0 * Fix update and delete event
This commit is contained in:
@@ -2,9 +2,11 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from fastapi import APIRouter
|
||||
|
||||
from backend.app.task.api.v1.task import router as task_router
|
||||
from backend.app.task.api.v1.result import router as task_result_router
|
||||
from backend.app.task.api.v1.scheduler import router as task_scheduler_router
|
||||
from backend.core.conf import settings
|
||||
|
||||
v1 = APIRouter(prefix=settings.FASTAPI_API_V1_PATH)
|
||||
v1 = APIRouter(prefix=f'{settings.FASTAPI_API_V1_PATH}/task', tags=['任务'])
|
||||
|
||||
v1.include_router(task_router, prefix='/tasks', tags=['任务'])
|
||||
v1.include_router(task_result_router, prefix='/results')
|
||||
v1.include_router(task_scheduler_router, prefix='/schedulers')
|
||||
|
||||
Reference in New Issue
Block a user