def update_query():
K = '%s_%s' %(g.user,g.secret_key)
Key = '%s_update_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("")
评论列表
文章目录