-
-
Notifications
You must be signed in to change notification settings - Fork 280
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
feat: 5405 - 3 queues for background tasks (fast, slow, long haul) #5743
Merged
monsieurtanuki
merged 2 commits into
openfoodfacts:develop
from
monsieurtanuki:feat/5405
Oct 27, 2024
Merged
feat: 5405 - 3 queues for background tasks (fast, slow, long haul) #5743
monsieurtanuki
merged 2 commits into
openfoodfacts:develop
from
monsieurtanuki:feat/5405
Oct 27, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
New file: * `background_task_queue.dart`: Queues for Background Tasks. Impacted files: * `background_task.dart`: now we add tasks to a specific queue * `background_task_add_other_price.dart`: assigned to `BackgroundTaskQueue.fast` * `background_task_add_price.dart`: assigned to `BackgroundTaskQueue.slow` * `background_task_badge.dart`: minor refactoring * `background_task_crop.dart`: assigned to `BackgroundTaskQueue.fast` * `background_task_details.dart`: assigned to `BackgroundTaskQueue.fast` * `background_task_download_products.dart`: assigned to `BackgroundTaskQueue.longHaul` * `background_task_full_refresh.dart`: assigned to `BackgroundTaskQueue.longHaul` * `background_task_hunger_games.dart`: assigned to `BackgroundTaskQueue.fast` * `background_task_image.dart`: assigned to `BackgroundTaskQueue.slow` * `background_task_language_refresh.dart`: assigned to `BackgroundTaskQueue.longHaul` * `background_task_manager.dart`: now using new class `BackgroundTaskQueue` in order to use multiple queues * `background_task_offline.dart`: assigned to `BackgroundTaskQueue.longHaul` * `background_task_refresh_later.dart`: assigned to `BackgroundTaskQueue.fast` * `background_task_top_barcodes.dart`: assigned to `BackgroundTaskQueue.longHaul` * `background_task_unselect.dart`: assigned to `BackgroundTaskQueue.fast` * `dao_string_list.dart`: added 2 queues * `local_database.dart`: now running all queues * `local_database_mock.dart`: minor refactoring * `offline_tasks_page.dart`: now taking queues into account * `up_to_date_mixin.dart`: now running all queues * `user_preferences_page.dart`: now running all queues
teolemon
reviewed
Oct 27, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Is the Add Price missing a barcode, or are those multiple prices ? (For better task consistency)
- Would a "Upload now" button be useful ? Perhaps on the edit page itself as a simplified thing ? "2 images and 1 edit pending upload. Attempt immediate upload" ?
"Add price" task means multiple product prices and proof image upload.
The current PR isn't about UI/UX. Can be done in a next PR. |
teolemon
approved these changes
Oct 27, 2024
Thank you @teolemon for your review! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What
Screenshots
Example of background tasks on an offline device (therefore everything fails):
Fixes bug(s)
Files
New file:
background_task_queue.dart
: Queues for Background Tasks.Impacted files:
background_task.dart
: now we add tasks to a specific queuebackground_task_add_other_price.dart
: assigned toBackgroundTaskQueue.fast
background_task_add_price.dart
: assigned toBackgroundTaskQueue.slow
background_task_badge.dart
: minor refactoringbackground_task_crop.dart
: assigned toBackgroundTaskQueue.fast
background_task_details.dart
: assigned toBackgroundTaskQueue.fast
background_task_download_products.dart
: assigned toBackgroundTaskQueue.longHaul
background_task_full_refresh.dart
: assigned toBackgroundTaskQueue.longHaul
background_task_hunger_games.dart
: assigned toBackgroundTaskQueue.fast
background_task_image.dart
: assigned toBackgroundTaskQueue.slow
background_task_language_refresh.dart
: assigned toBackgroundTaskQueue.longHaul
background_task_manager.dart
: now using new classBackgroundTaskQueue
in order to use multiple queuesbackground_task_offline.dart
: assigned toBackgroundTaskQueue.longHaul
background_task_refresh_later.dart
: assigned toBackgroundTaskQueue.fast
background_task_top_barcodes.dart
: assigned toBackgroundTaskQueue.longHaul
background_task_unselect.dart
: assigned toBackgroundTaskQueue.fast
dao_string_list.dart
: added 2 queueslocal_database.dart
: now running all queueslocal_database_mock.dart
: minor refactoringoffline_tasks_page.dart
: now taking queues into accountup_to_date_mixin.dart
: now running all queuesuser_preferences_page.dart
: now running all queues