mirror of
https://github.com/fastapi-practices/fastapi_best_architecture.git
synced 2026-03-13 09:31:31 +08:00
* Update the celery task result table creation logic * Disable beat_sync_every config * Update the prepared comment
16 lines
375 B
Python
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
|