Skip to content
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

periodically save check progress to verified_chunks #662

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

gutjuri
Copy link

@gutjuri gutjuri commented Jan 15, 2024

I have added code that periodically saves the list of verified chunks. This addresses the following feature request: https://forum.duplicacy.com/t/feature-request-periodically-write-the-list-of-verified-chunks/8014

For this, I have spawned a goroutine that calls saveVerifiedChunks() once every hour. The goroutine automatically terminated when all chunkIDs have been written to chunkChannel and thus at most threads chunks remain for verification.
Future improvements could add functionality that allows users to specify the interval at which the progress is saved through command-line parameters, however, I think that 1 hour is reasonable as writing to disks costs almost no resources.

I'd be grateful for feedback regarding this PR and hopefully getting this merged. In any case, thank you @gilbertchen for creating duplicacy!

Please excuse the formatting changes that have been performed automatically by my editor.

@CLAassistant
Copy link

CLAassistant commented Jan 15, 2024

CLA assistant check
All committers have signed the CLA.

@gilbertchen
Copy link
Owner

This pull request has been mentioned on Duplicacy Forum. There might be relevant details there:

https://forum.duplicacy.com/t/feature-request-periodically-write-the-list-of-verified-chunks/8014/6

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants