Pinning services could use a way to check the completion state of a pin so that they can provide that information to the users, otherwise, it is just pin/not pinned.
In the same way that ipfs add offers a progress bar, can we have a progress bar for pinning and a call ipfs pin status that yields the total size of blocks that were already pinned and how much is missing?
Thanks!
This would be a very useful for us, as we run a pinning service (www.eternum.io) and would like to check how pinning is going. It would also be helpful for knowing how much to charge the user and report the state of the pin back to them.
As an aside, another very useful feature would be to be able to pin asynchronously, ie without having the client wait for the entire object to be pinned. Should I open another issue with a description?
I might as well chime in here: It would be great if there were an asynchronous interface for the daemon. Right now, if you issue an ipfs pin <hash> command, that blocks until the object has been downloaded completely. What would be great instead if there were asynchronous commands:
~
ipfs pin
ipfs status
ipfs unpin
~
Thank you, @skorokithakis :)
@diasdavid note that we cant actually tell how much work to do there is for any given graph. every block we fetch might have more links, and since you cant guarantee every object correctly lists its size, you cant entirely rely on that either. The best we can do from this perspective is to give "number of nodes we have vs number of nodes we know about in the graph"
@skorokithakis on the topic of running commands asynchronously, see:
https://github.com/ipfs/go-ipfs/issues/3114
https://github.com/ipfs/go-ipfs/issues/3115
https://github.com/ipfs/go-ipfs/issues/3116
This work is pretty much ready to be done, though it might involve tweaks to the commands lib. cc @keks
@whyrusleeping Those linked issues look good, thank you. As I'm not familiar with the diag interface, I have to ask: Is there a way to start a pinning job asynchronously right now?
@skorokithakis no, there isnt currently a way to do that. If someone wants to work towards adding that functionality I can definitely point people in the right direction
Most helpful comment
I might as well chime in here: It would be great if there were an asynchronous interface for the daemon. Right now, if you issue an
ipfs pin <hash>command, that blocks until the object has been downloaded completely. What would be great instead if there were asynchronous commands:~ # Starts a download of the object and immediately returns. # Returns the bytes downloaded and total bytes of the object. # Unpins the object and deletes all of its data, stopping the download if it's underway. ipfs pin
ipfs status
ipfs unpin
~