publish_php.py 文件源码

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

项目:opsweb 作者: wylok 项目源码 文件源码
def publish_query():
    K = '%s_%s' %(g.user,g.secret_key)
    Key = '%s_publish_php' %K
    Key_incr = '%s_incr' % Key
    Redis.expire(Key,30)
    if Redis.lrange(Key,0,-1):
        data = Redis.rpop(Key)
        if '_End_' in data:
            Redis.expire(Key,3)
        return render_template_string(data)
    else:
        Redis.incr(Key_incr, 1)
        if int(Redis.get(Key_incr)) >10000:
            Redis.delete(Key_incr)
            return render_template_string("_End_")
        return render_template_string("")
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号