slack_archive.py 文件源码

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

项目:slag 作者: n8v-guy 项目源码 文件源码
def tokens_validation(self):
        self.log.info('Validating tokens')
        for token, enc_key in self.tokens.decrypt_keys_map().items():
            self.log.info('Check token %s', token)
            try:
                user_info = Slacker(token).auth.test().body
                SlackArchive.api_call_delay()
            except Error as err:
                self.mongo.db.z_errors.insert_one({'_id': time.time(),
                                                   'ctx': 'tokens_validation',
                                                   'msg': str(err)})
                self.log.exception('Error %s for token %s', str(err), token)
                del self.tokens[enc_key]
                continue
            self.log.info('Valid token')
            self.tokens.upsert(token, user_info)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号