Files
fastapi_best_architecture/backend/app/task/session.py
Wu Clan 1dfcd7ae3c Update the celery task result table creation logic (#783)
* Update the celery task result table creation logic

* Disable beat_sync_every config

* Update the prepared comment
2025-08-21 23:46:52 +08:00

16 lines
375 B
Python

#!/usr/bin/env python3
# -*- coding: utf-8 -*-
from celery.backends.database.session import SessionManager as CelerySessionManager
class SessionManager(CelerySessionManager):
"""
重写 celery SessionManager
"""
def __init__(self):
super().__init__()
# 禁止自动创建 celery 内部定义的任务结果表
self.prepared = True