Skip to content

[mob][photos] improve bg sync#9809

Open
prateekmedia wants to merge 40 commits intomainfrom
prtk/bg-patches
Open

[mob][photos] improve bg sync#9809
prateekmedia wants to merge 40 commits intomainfrom
prtk/bg-patches

Conversation

@prateekmedia
Copy link
Copy Markdown
Contributor

@prateekmedia prateekmedia commented Mar 26, 2026

Description

  • Adds BgProcessingTask
  • Reduces iOS frequency to 15mins instead of 30mins
  • Dynamic expiration time instead of the fixed timeout based expiration on iOS
  • Firebase sync uses _runMinimally

Tests

# Conflicts:
#	mobile/apps/photos/lib/main.dart
#	mobile/apps/photos/plugins/ente_feature_flag/lib/src/service.dart
Both onAppForeground and _waitForGraceWindowExpiration now snapshot
DateTime.now() before yielding to the event loop, ensuring concurrent
sync() lock acquisitions are never accidentally released.
Merge ios_background_handoff.dart into BgTaskUtils (removes 8 delegation
methods and a separate module). Inline BackgroundRunHelper lease logic
into main.dart as flat functions. Replace IOSBackgroundProcessingSchedule
class with a Dart record. Remove BackgroundSkipReason enum in favor of
inline log messages.

Deletes: background_run_helper.dart, ios_background_handoff.dart,
background_run_helper_test.dart (tested a now-deleted class).
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 6e165009bf

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

@prateekmedia
Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector
Copy link
Copy Markdown

Codex Review: Didn't find any major issues. 🚀

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

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.

1 participant