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

Background import operations should wait for existing import operations to finish #15

Open
vin047 opened this issue Aug 18, 2021 · 0 comments
Labels
bug Something isn't working

Comments

@vin047
Copy link
Contributor

vin047 commented Aug 18, 2021

Describe the bug
In background mode, if there are any existing import operations in progress, the background import operation will run simultaneously with those existing operations. This can result in assets being processed for import (including termination) twice. Note that this shouldn't produce duplicated data – asset should be skipped during individual operations, overwritten, or in case of a termination, attempts to terminate again.

To Reproduce

  1. Enable Debug logs and Backup & Sync.
  2. Leave phone on standby and on charge to begin background process.
  3. Later, observe in the logs that, once the app resumes in background mode, existing imports continue to process whilst background import begins to process the same assets for import.

Expected behavior
Background imports should not process assets that are in progress already.

Additional context
App enters suspended state when user leaves app. Later, on entry to background state, if app wasn't deallocated from memory, imports resume from where they left off. Background operations start and request unimported assets from the local database, which includes assets that are still being processed by existing imports.

Dependent on #16

@vin047 vin047 added the bug Something isn't working label Aug 18, 2021
@vin047 vin047 added code architecture Architectural code changes bug Something isn't working and removed bug Something isn't working code architecture Architectural code changes labels Aug 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant