fix: recover stale shared asset locks

This commit is contained in:
OpenClaw Agent
2026-09-17 02:31:05 +08:00
parent b853a239ff
commit dea1473424
+2
View File
@@ -83,8 +83,10 @@ func (a *App) acquireAsset(t *Task) (*MediaAsset, bool, error) {
return err
}
if current.Status == "downloading" && current.OwnerTaskID != t.ID {
if current.UpdatedAt.After(time.Now().Add(-10 * time.Minute)) {
return nil
}
}
current.Status, current.OwnerTaskID = "downloading", t.ID
if current.LocalPath == "" {
current.LocalPath = filepath.Join(a.cfg.DownloadDir, safe(t.Artist)+" - "+safe(t.Title)+"."+t.Format)