Test: aria2 task monitor

Fix: tmp file not deleted after transfer task failed to create
This commit is contained in:
HFO4
2021-11-09 20:53:42 +08:00
parent eeee43d569
commit 4d7b8685b9
7 changed files with 446 additions and 335 deletions

View File

@@ -3,6 +3,8 @@ package aria2
import (
"context"
"fmt"
"github.com/cloudreve/Cloudreve/v3/pkg/cluster"
"github.com/cloudreve/Cloudreve/v3/pkg/mq"
"net/url"
"sync"
"time"
@@ -42,7 +44,7 @@ func Init(isReload bool) {
for i := 0; i < len(unfinished); i++ {
// 创建任务监控
monitor.NewMonitor(&unfinished[i])
monitor.NewMonitor(&unfinished[i], cluster.Default, mq.GlobalMQ)
}
}
}