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

strengthen uploadthread #196

Merged
merged 2 commits into from
Oct 11, 2024

Conversation

StillGreen-san
Copy link
Collaborator

this has a few changes to make UploadThread more resilient

getBackupStatus will now directly return strings that do not need any replacements. in the past this function has often caused exceptions when called while UploadThread was in an inconsistent state, this reduces to chance of an exception.

run has been split into run and run_internal.
run_internal has the bulk of the actual upload logic.
run will wrap run_internal in a try block to make sure that lastBackupSuccessful and backupStatus are properly set when encountering an exception or returning early. both of those have caused problems in the past.
it also prevents UploadThread getting into an broken state with local-keep-count: 0 (resulting in an exception on further actions)

Copy link
Collaborator

@lrmtheboss lrmtheboss left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@lrmtheboss lrmtheboss merged commit 1de235b into MaxMaeder:master Oct 11, 2024
1 check passed
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.

2 participants