mirror of
https://github.com/langgenius/dify.git
synced 2026-04-24 04:45:51 +08:00
refactor: using DeclarativeBase as parent class of models, refactored tools
This commit is contained in:
@ -3,9 +3,10 @@ from datetime import datetime, timezone
|
||||
from celery import states
|
||||
|
||||
from extensions.ext_database import db
|
||||
from models.base import Base
|
||||
|
||||
|
||||
class CeleryTask(db.Model):
|
||||
class CeleryTask(Base):
|
||||
"""Task result/status."""
|
||||
|
||||
__tablename__ = "celery_taskmeta"
|
||||
@ -29,7 +30,7 @@ class CeleryTask(db.Model):
|
||||
queue = db.Column(db.String(155), nullable=True)
|
||||
|
||||
|
||||
class CeleryTaskSet(db.Model):
|
||||
class CeleryTaskSet(Base):
|
||||
"""TaskSet result."""
|
||||
|
||||
__tablename__ = "celery_tasksetmeta"
|
||||
|
||||
Reference in New Issue
Block a user