追加跟踪细粒度
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user