Reupload pinned content periodically
agazso opened this issue · 4 comments
So that the content is available for other nodes on the network. It can be done using the /stewardship
endpoint, by using the hashes from the list of pinned nodes.
There could be a new environment variable (REUPLOAD_PERIOD
) which would define the time when the reupload would happen.
@agazso does this feature is exclusive from the others in gateway-proxy, same as extended and autobuy?
This is independent of other features. If the REUPLOAD_PERIOD
is not undefined then this should happen every REUPLOAD_PERIOD
seconds.
@agazso I already have all the logic to retrieve all the pinned content according to the gateway procedures. Now I lack the criteria to know when to reupload the content. I tried using .isReferenceRetrievable()
method but I'm always getting true
What other criteria should I use to know when to reupload?
Also, I found the .reuploadPinnedData()
to finish the job, so I think half the battle has been done already
Yes, it's the .isReferenceRetrievable()
method. If it returns true, then there is nothing to do, because the data can be found on the network (at least from the perspective of the Bee node).
If it returns false
then it should call the .reuploadPinnedData()
.