oidstore.py 文件源码

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

项目:mist.api 作者: mistio 项目源码 文件源码
def cleanupAssociations(self):
        """Remove expired associations from the store.
        This method is not called in the normal operation of the
        library.  It provides a way for store admins to keep
        their storage from filling up with expired data.
        @return: the number of associations expired.
        @returntype: int
        """
        try:
            mist_associations = MistAssociation.objects()
        except me.DoesNotExist:
            mist_associations = []

        counter = 0
        for assoc in mist_associations:
            if assoc.is_expired():
                assoc.delete()
                counter += 1

        return counter
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号