Skip to content

Commit 949f866

Browse files
authored
fix: only recheck pin status if pinning or queued (#2236)
pickup will list a pin as "pinning" while it internally retries after an error. If fetching the DAG times our, or repeatedly errors for some other reason, pickup wont keep retrying it. The pin status will either be queued, pinning, pinned, or failed. change the logic of the pins cron to only recheck pins that are queued or pinning. License: MIT Signed-off-by: Oli Evans <oli@protocol.ai>
1 parent 78bbcdb commit 949f866

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

packages/cron/src/jobs/pins.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ export async function updatePinStatuses ({ cluster, db }) {
106106
return null
107107
}
108108

109-
if (status !== 'Pinned') reSyncPins.push(pin)
109+
if (status === 'PinQueued' || status === 'Pinning') reSyncPins.push(pin)
110110

111111
if (status === pin.status) {
112112
log(`🙅 ${pin.contentCid}@${pin.location.peerId}: No status change (${status})`)

0 commit comments

Comments
 (0)