MibooGram/core
2023-06-19 11:41:22 +08:00
..
builtins
dependence 🐛 Fix NamecardAssets 2023-05-31 23:13:40 +08:00
handler
override ⬆️ Bump all dependencies 2023-03-27 19:55:39 +08:00
plugin 🐛 Fix conversation admin check handle 2023-06-14 18:59:04 +08:00
services Support custom device 2023-06-19 11:41:22 +08:00
sqlmodel
__init__.py
application.py Add request flood restriction 2023-06-07 23:33:33 +08:00
base_service.py
basemodel.py
config.py Support Change BBS OSS Host 2023-05-27 00:05:23 +08:00
error.py
manager.py
ratelimiter.py Add request flood restriction 2023-06-07 23:33:33 +08:00
README.md

core 目录说明

关于 Service

服务 Service 需定义在 services 文件夹下, 并继承 core.service.Service

每个 Service 都应包含 startstop 方法, 且这两个方法都为异步方法

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"""