Skip to content

chore(attachments): minor improvements and fix loop #70

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

Merged
merged 4 commits into from
Apr 11, 2024

Conversation

DominicGBauer
Copy link
Contributor

Description

Minor improvements based on feedack

Work Done

  • Added a scheduled sync task that runs a sync and deletes archived data
  • Fixed loop to use continue instead of return
  • Removed unnecessary executeBatch delete

@@ -33,14 +33,18 @@ abstract class AbstractAttachmentQueue {
/// Return true if you want to ignore attachment
Future<bool> Function(Attachment attachment, Object exception)? onUploadError;

/// Interval in minutes to periodically delete archived attachments
Copy link
Contributor

Choose a reason for hiding this comment

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

Comments says this is for deleting archived attachments, but the timer also calls runSync() on the same interval. What effect does that have?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sorry I missed changing this comment. This sets the timer for startPeriodicSync which deletesArchived attachments and runs a sync again in case one of the attachments which was archived is now available to download.

@DominicGBauer DominicGBauer requested a review from rkistner April 10, 2024 11:54
@DominicGBauer DominicGBauer merged commit 1177101 into master Apr 11, 2024
@DominicGBauer DominicGBauer deleted the chore/minor-improvements2 branch April 11, 2024 12:35
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