Skip to content

fix(sync): apply activity interval before scheduling - #13710

Open
abhinavohri wants to merge 1 commit into
nextcloud:mainfrom
abhinavohri:fix/adaptive-sync-interval
Open

abhinavohri wants to merge 1 commit into
nextcloud:mainfrom
abhinavohri:fix/adaptive-sync-interval

Conversation

@abhinavohri

@abhinavohri abhinavohri commented Sep 20, 2026

Copy link
Copy Markdown
Contributor

Fixes #13620

Summary:
SyncJob set its activity-based interval in run(), after Nextcloud had decided the job was due. Because that interval was not persisted, hence the inactive accounts kept syncing hourly.

Shifting the logic to setArgument() lets Nextcloud use the correct interval when it makes the due decision.

Nextcloud checks a timed job interval before run(), so changing it during sync cannot affect when the job is selected. Set the activity-based interval when the account argument is loaded, while preserving administrator overrides.

Assisted-by: Codex:gpt-5
Signed-off-by: Abhinav Ohri <abhinavohri13@gmail.com>
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.

Background sync interval never adapts to user activity

1 participant