mirror of
https://github.com/OpenListTeam/OpenList.git
synced 2026-05-06 23:31:59 +08:00
fix(fs):fix retry task after restart (#1467)
* fix retry task after restart * fix: initialize SrcStorage and DstStorage in tasks to prevent nil pointer dereference * feat: implement storage load signal mechanism for improved synchronization * fix: update StoragesLoaded logic * refactor: reorganize storage loading logic and improve synchronization handling --------- Co-authored-by: j2rong4cn <j2rong@qq.com>
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package db
|
||||
|
||||
import (
|
||||
"github.com/OpenListTeam/OpenList/v4/internal/conf"
|
||||
"github.com/OpenListTeam/OpenList/v4/internal/model"
|
||||
"github.com/pkg/errors"
|
||||
)
|
||||
@@ -30,6 +31,7 @@ func GetTaskDataFunc(type_s string, enabled bool) func() ([]byte, error) {
|
||||
return nil
|
||||
}
|
||||
return func() ([]byte, error) {
|
||||
<-conf.StoragesLoadSignal()
|
||||
return []byte(task.PersistData), nil
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user