Add plugin tasks (#651)

This commit is contained in:
WithoutPants
2020-08-08 12:05:35 +10:00
committed by GitHub
parent 0874852fa8
commit 0ffefa6e16
47 changed files with 2855 additions and 17 deletions

View File

@@ -65,6 +65,13 @@ func (t *TaskStatus) setProgress(upTo int, total int) {
t.updated()
}
func (t *TaskStatus) setProgressPercent(progress float64) {
if progress != t.Progress {
t.Progress = progress
t.updated()
}
}
func (t *TaskStatus) incrementProgress() {
t.setProgress(t.upTo+1, t.total)
}