mirror of
https://github.com/PaiGramTeam/PaiGram.git
synced 2024-11-25 18:04:10 +00:00
f122e21092
* 增加 html to image 缓存 * 对 template_service.render 进行封装,管理缓存逻辑 * cache key 为 html 的 sha256 * cache value 为 reply_photo 后 telegram 返回的 file_id * 存入 redis,并设置合理的 ttl Co-authored-by: 洛水居室 <luoshuijs@outlook.com> Co-authored-by: xtaodada <xtao@xtaolink.cn> |
||
---|---|---|
.. | ||
admin | ||
base | ||
cookies | ||
game | ||
quiz | ||
sign | ||
template | ||
user | ||
wiki | ||
baseplugin.py | ||
bot.py | ||
config.py | ||
error.py | ||
plugin.py | ||
README.md | ||
service.py |
core 目录说明
关于 Service
服务 Service
需定义在 services
文件夹下, 并继承 core.service.Service
每个 Service
都应包含 start
和 stop
方法, 且这两个方法都为异步方法
from core.service import Service
class TestService(Service):
def __init__(self):
"""do something"""
async def start(self, *args, **kwargs):
"""do something"""
async def stop(self, *args, **kwargs):
"""do something"""