fix: recover stale shared asset locks
This commit is contained in:
@@ -83,7 +83,9 @@ func (a *App) acquireAsset(t *Task) (*MediaAsset, bool, error) {
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
if current.Status == "downloading" && current.OwnerTaskID != t.ID {
|
if current.Status == "downloading" && current.OwnerTaskID != t.ID {
|
||||||
return nil
|
if current.UpdatedAt.After(time.Now().Add(-10 * time.Minute)) {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
}
|
}
|
||||||
current.Status, current.OwnerTaskID = "downloading", t.ID
|
current.Status, current.OwnerTaskID = "downloading", t.ID
|
||||||
if current.LocalPath == "" {
|
if current.LocalPath == "" {
|
||||||
|
|||||||
Reference in New Issue
Block a user