Skip to content

feat(#10280): document the replication_interval_minutes setting - #2268

Merged
jkuester merged 3 commits into
medic:mainfrom
dacar1988:10280-replication-interval
Oct 15, 2026
Merged

jkuester merged 3 commits into
medic:mainfrom
dacar1988:10280-replication-interval

Conversation

@dacar1988

Copy link
Copy Markdown
Contributor

Description

Documents the new replication_interval_minutes app setting from medic/cht-core#11475 (issue medic/cht-core#10280), as @jkuester asked in the review.

  • App settings reference (building/reference/app-settings/_index.md): a new row in "Optional Settings" and a short "Replication interval" section. Default 5 minutes, allowed values 5 to 1440 (fractions are fine), any other value falls back to 5 minutes with a console warning. A new value is used once the device has downloaded the settings and the app has been reloaded.
  • Synchronization triggers (building/navigation.md): "Periodic Sync" now says 5 minutes is the default and links to the setting. The metadata database syncs every 30 minutes or at the configured interval, whichever is longer.
  • Replication performance (technical-overview/data/performance/replication.md): a "Replication interval" section on the tradeoff (shorter means fresher data but more server load; longer means less load but slower updates), and the app-settings page added to relatedContent.

The "Version" column of the new row is empty until the release is known.

Tested with hugo (extended 0.158.0): the site builds and the internal link check passes.

AI disclosure: the changes were written with OpenAI Codex and reviewed with Claude Code, under my direction. I reviewed them before opening this PR.

License

The software is provided under AGPL-3.0. Contributions to this project are accepted under the same license.

@jkuester jkuester left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thank you @dacar1988! These are good docs! 👍

Got a few minor requests and these are good to go!

Comment thread content/en/building/navigation.md Outdated
Comment thread content/en/technical-overview/data/performance/replication.md Outdated
Comment thread content/en/technical-overview/data/performance/replication.md Outdated

A shorter interval within this range gives users fresher data but increases server load. A longer interval reduces the number of periodic replication requests and can ease CPU pressure in deployments with many users. For example, a 30-minute interval schedules periodic syncs less often than the five-minute default, but users may wait longer to receive updates from other users (especially users who keep saving changes, because each local change restarts the periodic timer). Consider how quickly your workflows need those updates before increasing the interval.

The metadata sync interval also increases when the configured interval exceeds 30 minutes. Manual sync and immediate uploads after local changes remain available. Clients use the configured interval after they download the updated settings and reload.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
The metadata sync interval also increases when the configured interval exceeds 30 minutes. Manual sync and immediate uploads after local changes remain available. Clients use the configured interval after they download the updated settings and reload.
The metadata sync interval also increases when the configured interval exceeds 30 minutes. Manual sync and immediate uploads after local changes remain available.

Don't need that last part. This is universally true of all these settings.

Comment thread content/en/building/reference/app-settings/_index.md Outdated
Keep the details on the replication page and only a summary row in the
app settings table. The links that pointed to the removed app-settings
section now point to the replication page and the Optional Settings table.

Co-authored-by: Joshua Kuestersteffen <8441903+jkuester@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@dacar1988

Copy link
Copy Markdown
Contributor Author

Thanks! I applied all your suggestions. Since the “Replication interval” section on the app-settings page is now gone, I also updated the two links that pointed to it: the navigation page now links to the replication page, and the replication page links to the Optional Settings table. Let me know if you’d prefer different targets.

@jkuester jkuester left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Very nice! I pushed a few minor changes including setting 5.4.0 as the target release.

@jkuester
jkuester merged commit 6fe2464 into medic:main Oct 15, 2026
1 check passed
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.

3 participants