-
Notifications
You must be signed in to change notification settings - Fork 5
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 Pause and Resume Support #2
Comments
I'll get this one if you don't mind |
I would like to refactor a bit the code (add a pluto struct to the package, change actual functions for receiver functions, clean up the package main by moving logic to pluto package). Is it ok? |
@josledp Yes, Sure you can work on it and it's okay to refactor it if you want. :) |
a couple of design doubts. Will it be wise to update an state file continuously? (instead just when the context is cancelled). And, do we recover automagically the state file, or would it better to add a flag to explicitly request for it? (I would prefer adding a flag and make it explicit, as wget does, but the former is also ok) |
Updating the state of a file where the state is stored continuously may not be a good idea because of high CPU Use. I added few commits to main branch, There were few bugs, That I fixed. It now runs |
This feature has to be added in the CLI application.
If an error occurs or user chooses to cancel the active download, It'll create a file with some extension(You can choose any extension you like provided it's short and isn't used by some other huge program) which will have information about,
When the program is started again, It'll see if there is a file named
<file name>.<whatever extension you chose
. If such a file exists, It'll read that file and start downloading the bytes which have not been downloaded yet.And if there is no such file, It should take the given settings as input and start working normally like it does now.
You can use
go-bindata
to store current state of download or just use a plain JSON.The text was updated successfully, but these errors were encountered: