同时保存入数据库时候 ,使用 uuid.uuid1() 后出现 重复的 id ,
现在 修改为
(uuid.uuid5(uuid.NAMESPACE_DNS, str(uuid.uuid1()) + str(random.random())))
同时保存入数据库时候 ,使用 uuid.uuid1() 后出现 重复的 id ,
现在 修改为
(uuid.uuid5(uuid.NAMESPACE_DNS, str(uuid.uuid1()) + str(random.random())))
上一篇:python 使用requests 请求 https 接口 ,取消警告waring
下一篇:python 操作 redis的 list ,删除不了这个 值 ,使用 lrem 删除不了对应的值,使用lrem删除不了json格式的值
这篇文章讨论了唯一标识符(UUID)在应用程序中的重要性,以及如何通过一些改进来增强用户体验。
redis缓存 setIfAbsent防止重复提交
举报文章
请选择举报类型
补充说明
0/200
上传截图
格式支持JPEG/PNG/JPG,图片不超过1.9M