追加跟踪细粒度

This commit is contained in:
aixianling
2023-01-19 10:03:50 +08:00
parent 8f374c1221
commit 7bcc5c3de8

View File

@@ -11,6 +11,7 @@ const handleZip = (id, ws) => {
class counter {
constructor(remark) {
this.count = 0
sendMessage({code: 0, progress: this.count, remark})
this.timer = setInterval(() => {
sendMessage({code: 0, progress: ++this.count, remark})
}, 6000)
@@ -19,6 +20,7 @@ const handleZip = (id, ws) => {
set(progress, remark) {
if (this.timer) clearInterval(this.timer)
this.count = progress
sendMessage({code: 0, progress: this.count, remark})
this.timer = setInterval(() => {
sendMessage({code: 0, progress: ++this.count, remark})
}, 4000)