摘要: 因为with里面,一旦结束,就会重新生成with环境变量 https://stackoverflow.com/questions/19277280/preserving-global-state-in-a-flask-application 我们需要保证每个request是独立的,这样才不会造成某个 阅读全文
posted @ 2020-07-08 17:53 yjy888 阅读(152) 评论(0) 推荐(0) 编辑
摘要: 不同的应用如果都需要redis,,可以创建多个 pool = redis.ConnectionPool(host='127.0.0.1', port=6379, decode_responses=True,db=1)r1 = redis.Redis(connection_pool=pool)r1.f 阅读全文
posted @ 2020-07-08 14:16 yjy888 阅读(459) 评论(0) 推荐(0) 编辑
摘要: https://stackoverflow.com/questions/1609637/is-it-possible-to-insert-multiple-rows-at-a-time-in-an-sqlite-database 阅读全文
posted @ 2020-07-08 10:07 yjy888 阅读(413) 评论(0) 推荐(0) 编辑