feat 新增清理TMDB缓存命令

This commit is contained in:
jxxghp
2023-08-22 12:32:48 +08:00
parent afe5ee9abb
commit 7435b7c702
5 changed files with 44 additions and 2 deletions

17
app/chain/system.py Normal file
View File

@ -0,0 +1,17 @@
from typing import Union
from app.chain import ChainBase
from app.schemas import Notification, MessageChannel
class SystemChain(ChainBase):
"""
系统级处理链
"""
def remote_clear_cache(self, channel: MessageChannel, userid: Union[int, str]):
"""
清理系统缓存
"""
self.clear_cache()
self.post_message(Notification(channel=channel,
title=f"缓存清理完成!", userid=userid))