perf: 上传最近 1 小时的日志, 直接upload 所有日志: 413 Payload Too Large

dev/supplier-email-drawer
Lei OT 9 months ago
parent bec63bbfc2
commit 2abdc6ccaf

@ -89,10 +89,20 @@ function AuthApp() {
await readWebsocketLog()
if (window.$pageSpy) {
// window.$pageSpy.triggerPlugins('onOfflineLog', 'upload')
await window.$harbor.upload() // { clearCache: true, remark: '' }
messageApi.info('Success')
clearWebsocketLog()
sendNotify()
try {
// await window.$harbor.upload() // { clearCache: true, remark: '' }
// 1 , upload : 413 Payload Too Large
const now = Date.now()
await window.$harbor.uploadPeriods({
startTime: now - 60 * 60000,
endTime: now,
})
messageApi.info('Success')
clearWebsocketLog()
sendNotify()
} catch (error) {
messageApi.error('Failure')
}
} else {
messageApi.error('Failure')
}

Loading…
Cancel
Save