Document sync_interval for deb/alpine and fix created_at gate on existing rows (#176)
`sync_interval` is documented only for github_rpm, and the claim gate holding back remotes created inside the current slot also blocks remotes that already have a sync state row: the gate filters the INSERT SELECT, so ON CONFLICT never runs and a failed cold-cache prime waits a full slot instead of its backoff. - document `sync_interval` for github_deb/github_alpine and in the caching field table - apply the created_at gate only when no sync state row exists - test 0→N and N→0 interval changes and the insert-only gate against Postgres - test that a negative `sync_interval` on update returns 400 Reviewed-on: #176 Co-authored-by: unkin-agent <unkin-agent@unkin.net> Co-committed-by: unkin-agent <unkin-agent@unkin.net>
This commit was merged in pull request #176.
This commit is contained in:
@@ -101,6 +101,12 @@ func TestSyncIntervalAPI(t *testing.T) {
|
||||
t.Errorf("%s = %d, want 400", body, c)
|
||||
}
|
||||
}
|
||||
if c := do(t, h, "PUT", "/si-gh", `{`+gh+`,"sync_interval":-1}`); c != 400 {
|
||||
t.Errorf("update negative = %d, want 400", c)
|
||||
}
|
||||
if got := interval("si-gh"); got != 3600 {
|
||||
t.Errorf("rejected update changed sync_interval to %d", got)
|
||||
}
|
||||
}
|
||||
|
||||
func TestQuarantineDaysDefault(t *testing.T) {
|
||||
|
||||
Reference in New Issue
Block a user