We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
背景:网关会经常出现网络不好的情况,比如4G模块,在恶劣条件下,会导致数据无法上传 解决方案:每条数据记录当前时间戳,如果此条数据上报不成功,则存储,等到下个上报周期,如果新数据上报成功后,马上上报存储的失败数据
The text was updated successfully, but these errors were encountered:
增加一个函数:applib:LocalCache("UUID", data)
applib:LocalCache("UUID", data)
local err = applib:DataToUdp("UUID", data) if err ~=nil then applib:LocalCache("UUID", data) print("Failed And LocalCache") else print("Success") end
然后过一段时间恢复以后LocalCache会把数据推到"UUID"所指向的目标。
这个其实不难,用Sqlite即可,每次LocalCache的时候,新建一个表,将数据压入,等恢复以后,再弹出数据,并且删除即可。
Sorry, something went wrong.
数据仓库可以解决
wwhai
No branches or pull requests
背景:网关会经常出现网络不好的情况,比如4G模块,在恶劣条件下,会导致数据无法上传
解决方案:每条数据记录当前时间戳,如果此条数据上报不成功,则存储,等到下个上报周期,如果新数据上报成功后,马上上报存储的失败数据
The text was updated successfully, but these errors were encountered: