Fix #1785: Ensure up-to-date status for re-pinned items.
This commit is contained in:
parent
d1dd3242f9
commit
9dcf0bdd9a
|
@ -56,7 +56,6 @@ type Operation struct {
|
||||||
|
|
||||||
tracker *OperationTracker
|
tracker *OperationTracker
|
||||||
|
|
||||||
// RO fields
|
|
||||||
opType OperationType
|
opType OperationType
|
||||||
pin api.Pin
|
pin api.Pin
|
||||||
|
|
||||||
|
|
|
@ -86,7 +86,9 @@ func (opt *OperationTracker) TrackNewOperation(ctx context.Context, pin api.Pin,
|
||||||
if ok { // operation exists for the CID
|
if ok { // operation exists for the CID
|
||||||
if op.Type() == typ && op.Phase() != PhaseError && op.Phase() != PhaseDone {
|
if op.Type() == typ && op.Phase() != PhaseError && op.Phase() != PhaseDone {
|
||||||
// an ongoing operation of the same
|
// an ongoing operation of the same
|
||||||
// type. i.e. pinning, or queued.
|
// type. i.e. pinning, or queued. Update the pin
|
||||||
|
// object though, as it may have different options.
|
||||||
|
op.pin = pin
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
// i.e. operations in error phase
|
// i.e. operations in error phase
|
||||||
|
|
Loading…
Reference in New Issue
Block a user