feat(statuspage): keep serving status pages while the api is down
Snapshots are persisted to UPTIME_STATUSPAGE_CACHE_DIR and loaded at start, so pages survive restarts during an outage. Cached pages are answered without waiting for the API, refreshed in the background and served for as long as the API stays unreachable, with a notice once they are older than five minutes. Only an explicit not found from the API removes a page. Readiness no longer depends on the API when pages are cached, the server starts without a reachable API, and certificates are mirrored locally so HTTPS keeps working after a restart. Closes #56 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017GpWAskjmYtZpuQ5JwYTX3
This commit is contained in:
1 parent
20664dd5dd
commit
6e2f8d0626
12 files changed
+660
-214
No files matched your search
@@ -38,6 +38,11 @@ templ PublicStatusPage(s agentapi.PageSnapshot, a PublicAssets) {
|
||||
<p class="mt-2 text-muted">{ s.Description }</p>
|
||||
}
|
||||
</header>
|
||||
if !a.StaleSince.IsZero() {
|
||||
<p class="mb-6 border border-degraded/50 bg-degraded/10 px-4 py-2 text-sm">
|
||||
{ i18n.T(ctx, "page.stale", "Time", a.StaleSince.UTC().Format("2006-01-02 15:04")+" UTC") }
|
||||
</p>
|
||||
}
|
||||
<section
|
||||
class={ "mb-12 border-l-4 py-3 pl-4",
|
||||
templ.KV("border-up", s.Status == agentapi.PageOperational),
|
||||
|
||||
Reference in new issue
Block a user