新增 消息定时推送功能
This commit is contained in:
@@ -47,7 +47,6 @@ class MessagePushTask(MessagePluginInterface):
|
|||||||
super().__init__()
|
super().__init__()
|
||||||
self.feature = self.register_feature()
|
self.feature = self.register_feature()
|
||||||
self.db = None
|
self.db = None
|
||||||
async_job.every_seconds(5)(self.process_scheduled_tasks)
|
|
||||||
|
|
||||||
def initialize(self, context: Dict[str, Any]) -> bool:
|
def initialize(self, context: Dict[str, Any]) -> bool:
|
||||||
"""初始化插件"""
|
"""初始化插件"""
|
||||||
@@ -61,6 +60,7 @@ class MessagePushTask(MessagePluginInterface):
|
|||||||
# 初始化组件
|
# 初始化组件
|
||||||
self.db = TaskDBOperator(self.db_manager)
|
self.db = TaskDBOperator(self.db_manager)
|
||||||
|
|
||||||
|
async_job.every_seconds(5)(self.process_scheduled_tasks)
|
||||||
# 初始化数据库表
|
# 初始化数据库表
|
||||||
if not self.db.init_tables():
|
if not self.db.init_tables():
|
||||||
self.LOG.error("初始化数据库表失败")
|
self.LOG.error("初始化数据库表失败")
|
||||||
|
|||||||
Reference in New Issue
Block a user