chore(aria2): export task manager

This commit is contained in:
Noah Hsu
2022-06-23 21:24:23 +08:00
parent 92983aa185
commit 40b7ecc845
5 changed files with 17 additions and 10 deletions

View File

@ -43,7 +43,7 @@ func AddURI(ctx context.Context, uri string, dstDirPath string) error {
if err != nil {
return errors.Wrapf(err, "failed to add uri %s", uri)
}
downTaskManager.Submit(task.WithCancelCtx(&task.Task[string]{
DownTaskManager.Submit(task.WithCancelCtx(&task.Task[string]{
ID: gid,
Name: fmt.Sprintf("download %s to [%s](%s)", uri, account.GetAccount().VirtualPath, dstDirActualPath),
Func: func(tsk *task.Task[string]) error {