Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

反馈 #1

Open
zhugw opened this issue Nov 24, 2023 · 1 comment
Open

反馈 #1

zhugw opened this issue Nov 24, 2023 · 1 comment

Comments

@zhugw
Copy link

zhugw commented Nov 24, 2023

得要按照实际的情况来设计

正常情况下数据肯定是保存在库中的 所以得要基于数据库去设计流程

“客户端上传截图失败后,调用添加链接接口,将链接归还;”
客户端万一挂了呢 万一网络不好超时了呢 客户端都没有收到呢?

“每次返回了的链接都放在一个List中保存,当客户端上传完截图后,在到这个List里删除。并且开启定时任务,每隔一段时间就将这个List中的链接 归还回去”
怎么区分哪些是刚放的 哪些是客户端没能上传的呢?

@CCYYT
Copy link
Owner

CCYYT commented Nov 24, 2023

基于数据库删除 我想到的 逻辑删除+延时消息rabbitmq 客户端获取了链接后 将链接状态设置为已获取 然后发送一条延时消息到mq 到时间后将链接状态重制 如果在重制前 客户端上传了截图就将链接设置为已完成状态

或者不使用mq 将链接添加一个时间戳字段 客户端获取到链接后打上当前的时间戳 开启一个线程定时扫描表 将超过一定时间没上传截图的链接状态重置

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants