New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add a --wait flag as global command
#3114
Comments
|
We would also have to return job number somehow. |
|
This (or rather, not this, but what it implies) is crucial for us in the development of Eternum (an IPFS pinning service). Our problem is that, currently, pinning things launches a task that may just time out if the file is too long, so there's no way to reliably charge for pinning. if we charge after the file has been downloaded, we might spend a month downloading a huge file without charging anything. If we charge before, we might be charging for a transfer that will time out or be interrupted at some point. Also, if the user unpins the file before it's finished pinning, the pinning doesn't get cancelled. A job system for pinning files would solve all our problems, as then they would become job management problems instead of having to manage everything ourselves. Basically, if pinning worked like a torrent client does, with starting/pausing/stopping/deleting, it would be ideal for us. As it stands, we have a very large problem even delivering on our promised services. |
|
Hi, all! I saw that this related to the feature requested in #4041 but I wasn't sure of it's status - are these commands currently being worked on or does it still need to be built? |
|
@forstmeier this still needs to be built. There is a small amount of design still yet to be done around the UX and API of this, but it should be pretty straightforward, all the hard bits and pieces are pretty much there already. The main questions are "what do we name the flag?" and "how do we return the job ID?" |
|
@whyrusleeping Cool! So I understand (and correct me where I'm wrong):
Let me know if I'm missing something in that list.
To address your questions while thinking out loud:
|
This would basically be 'block until this job is complete'
I like
That can (and will) be one way to get the id of a command/job in order to cancel it, but I think its important to be able to get the job ID from each command you start, in case you run many commands that are similar, it may become hard to disambiguate them through the 'ps -a' type interface of In any case, feel free to start poking at this :) My only ask is that you propose your approaches here (or in a separate issue) for some light discussion before starting to hack on things. More often than not some upfront discussion of approach would have saved a lot of contributor and reviewer time around here. |
|
I'll definitely drop my plans/ideas into this and the other relevant issue comments so that everyone is in the loop.
For this I'd assume that either 1) commands would need to generate the ID as a default or 2) Thanks for the clarification/guidance! |
whyrusleeping commentedAug 23, 2016
It was discussed in irc that it would be very nice to be able to start a command but not wait for it to return. If we implement
ipfs diag cmds cancel <job>andipfs diag cmds wait <job>we would have all the tools we need to deal with 'backgrounded' commands.cc @pjz
The text was updated successfully, but these errors were encountered: