core.py 文件源码

python
阅读 20 收藏 0 点赞 0 评论 0

项目:sir-bot-a-lot 作者: pyslackers 项目源码 文件源码
def update(self):
        """
        Update sirbot

        Trigger the update method of the plugins. This is needed if the plugins
        need to perform update migration (i.e database)
        """
        logger.info('Updating Sir Bot-a-lot')
        for name, plugin in self._plugins.items():
            plugin_update = getattr(plugin['plugin'], 'update', None)
            if callable(plugin_update):
                logger.info('Updating %s', name)
                await plugin_update(self.config.get(name, {}), self._plugins)
                logger.info('%s updated', name)
        self._session.close()
        logger.info('Sir Bot-a-lot updated')
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号