mirror of
https://github.com/krau/SaveAny-Bot.git
synced 2026-09-04 23:26:39 +08:00
fix(core): recover task state correctly on restart
This commit is contained in:
@@ -21,6 +21,9 @@ import (
|
||||
func (t *Task) Execute(ctx context.Context) error {
|
||||
logger := log.FromContext(ctx).WithPrefix(fmt.Sprintf("transfer[%s]", t.ID))
|
||||
logger.Info("Starting transfer task")
|
||||
if t.overwrite {
|
||||
ctx = storage.WithOverwrite(ctx)
|
||||
}
|
||||
if t.Progress != nil {
|
||||
t.Progress.OnStart(ctx, t)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user