feat: create lock file after sync is finished #9
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
We want to to create a lock file after sync is finished.
If a process is killed during the sync process, the next time it starts it needs to perform the sync again. If the lock file is already there is won't do anything
Fixes
Move the 'create lock file' logic down
Notes
Keep in mind that once we have a lease-option for files we can utilize that; create a lock file which we lease, and as long there is an active lease, the process can wait syncing until the lease is released.
However; there is a risk of a lease never to be released which prevents a process from continuing if it relies on the sync process. So we need to think this through well.