Skip to content

Create individual workers for every Autoupload Folder - #13015

Merged
alperozturk96 merged 5 commits into
masterfrom
remove-foreground-worker-for-auto-upload
Jun 3, 2024
Merged

alperozturk96 merged 5 commits into
masterfrom
remove-foreground-worker-for-auto-upload

Conversation

@JonasMayerDev

@JonasMayerDev JonasMayerDev commented May 16, 2024 •

Copy link
Copy Markdown
Collaborator

This PR finally gets rid of the foreground worker and the corresponding notification by lowering the chance the worker gets killed.

Internally, the app now starts a new worker for every auto upload folder instead of one worker for all folders.
Advantages are:

  • Worker finish quicker -> Lower chance of being killed
  • Scanning of Folders can happen in parallel
  • Better handling in the future

The best way to test is using logcat and filtering for "File sync" since all important log messages start with that term. Like this, you should be able to observe the behavior of the background worker without messing with it. If you want to check something specific, use the debugger, but be aware that that changes behavior (like execution speed).

  • Tests written, or not not needed

@JonasMayerDev JonasMayerDev changed the title Remove ForegroundWorker from Auto Upload Create individual workers for every Autoupload Folder May 16, 2024
@JonasMayerDev
JonasMayerDev force-pushed the remove-foreground-worker-for-auto-upload branch 3 times, most recently from d011ec9 to 49103a7 Compare May 16, 2024 17:55
@JonasMayerDev
JonasMayerDev force-pushed the remove-foreground-worker-for-auto-upload branch from bbc8743 to d91b652 Compare May 28, 2024 18:06
@JonasMayerDev
JonasMayerDev marked this pull request as ready for review May 28, 2024 18:07
@github-actions

Copy link
Copy Markdown

Codacy

Lint

TypemasterPR
Warnings7171
Errors33

SpotBugs

CategoryBaseNew
Bad practice6464
Correctness6969
Dodgy code346346
Experimental11
Internationalization77
Malicious code vulnerability22
Multithreaded correctness66
Performance5757
Security1919
Total571571

@github-actions

Copy link
Copy Markdown

APK file: https://www.kaminsky.me/nc-dev/android-artifacts/13015.apk

qrcode

To test this change/fix you can simply download above APK file and install and test it in parallel to your existing Nextcloud app.

@github-actions

Copy link
Copy Markdown

@alperozturk96 alperozturk96 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Tested. I created 3 folder set auto upload and only 3 worker created for each auto upload and all uploads successfully completed.

@alperozturk96
alperozturk96 merged commit 0459e97 into master Jun 3, 2024
@delete-merged-branch
delete-merged-branch Bot deleted the remove-foreground-worker-for-auto-upload branch June 3, 2024 09:49
@AndyScherzinger AndyScherzinger added this to the Nextcloud App 3.30.0 milestone Jun 3, 2024
@JonasMayerDev JonasMayerDev mentioned this pull request Jun 3, 2024
4 tasks done
@github-actions

github-actions Bot commented Aug 6, 2024

Copy link
Copy Markdown

Hello there,
Thank you so much for taking the time and effort to create a pull request to our Nextcloud project.

We hope that the review process is going smooth and is helpful for you. We want to ensure your pull request is reviewed to your satisfaction. If you have a moment, our community management team would very much appreciate your feedback on your experience with this PR review process.

Your feedback is valuable to us as we continuously strive to improve our community developer experience. Please take a moment to complete our short survey by clicking on the following link: https://cloud.nextcloud.com/apps/forms/s/i9Ago4EQRZ7TWxjfmeEpPkf6

Thank you for contributing to Nextcloud and we hope to hear from you soon!

(If you believe you should not receive this message, you can add yourself to the blocklist.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants