Skip to content

docs: correct default PERIOD to 10m to match code#1148

Open
buddhaCode wants to merge 1 commit into
qdm12:masterfrom
buddhaCode:docs/period-default-10m
Open

docs: correct default PERIOD to 10m to match code#1148
buddhaCode wants to merge 1 commit into
qdm12:masterfrom
buddhaCode:docs/period-default-10m

Conversation

@buddhaCode

Copy link
Copy Markdown

Problem

The README documents the default PERIOD as 5m, but the code uses 10m. The documentation and the actual behavior disagree.

Code reference (current master):

// internal/config/update.go
func (u *Update) setDefaults() {
	const defaultPeriod = 10 * time.Minute
	u.Period = gosettings.DefaultComparable(u.Period, defaultPeriod)
	const defaultCooldown = 5 * time.Minute
	u.Cooldown = gosettings.DefaultComparable(u.Cooldown, defaultCooldown)
}

I checked the history across releases v2.4.0 through v2.9.0 and master: the code default has always been 10m (it was params.Default("10m") before the gosettings rework). So this looks like stale documentation rather than a code regression.

Change

This PR only touches the README to align the docs with the code (5m -> 10m) at the three relevant spots:

  • The PERIOD row in the environment variables table.
  • The Architecture section: "every period (10 minutes by default)".
  • The Cloudflare special case: "every period (10 minutes by default), for each record".

The UPDATE_COOLDOWN_PERIOD default (5m) is left unchanged, since it correctly matches defaultCooldown = 5 * time.Minute.

No code is modified, so no Go tests are affected.

Alternative

If 5m was actually the intended default and the code is what's wrong, the fix would instead be to change defaultPeriod back to 5 * time.Minute in internal/config/update.go. I went with the documentation fix as the lower-risk option, but happy to switch this to a code change instead if you prefer — your call.

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