Refactor architecture into eight components and consolidate reliability work
Extract Grammaratur, Dregarnuhr, Geduldh, Mestionora, Ordoschnellic, Schutzaria, Kunstzeal and Seheweit behind compatible application contracts. Include accumulated editor resilience, navigation and theme UX, remote CLI, storage/schema and DR groundwork, tests and design/operations documentation. Verified: uncached full Go suite; go vet ./...; race tests for all eight components; 11 targeted Chromium tests; Node suites; 19 Python CLI tests; reproducible editor build. No push, release tag or deployment in this checkpoint.
This commit is contained in:
1 parent
9dd425f765
commit
d5d21b7841
302 files changed
+20037
-3492
No files matched your search
@@ -16,6 +16,7 @@ import (
|
||||
routespkg "pageswiki/internal/server/routes"
|
||||
|
||||
"pageswiki/internal/calendar"
|
||||
"pageswiki/internal/dregarnuhr"
|
||||
"pageswiki/internal/store"
|
||||
)
|
||||
|
||||
@@ -37,6 +38,10 @@ type Server struct {
|
||||
schedulerWake chan struct{}
|
||||
foregroundRequests atomic.Int64
|
||||
schedulerRunning atomic.Int64
|
||||
schedulerOnce sync.Once
|
||||
schedulerRunner *dregarnuhr.Runner
|
||||
eventHandlersOnce sync.Once
|
||||
eventHandlers *dregarnuhr.Registry
|
||||
}
|
||||
|
||||
func New(
|
||||
@@ -52,12 +57,16 @@ func New(
|
||||
ldapDial: dialLDAPDirectory,
|
||||
schedulerWake: make(chan struct{}, 1),
|
||||
}
|
||||
s.initializePreviewScheduler()
|
||||
s.initializeImportRoot()
|
||||
if !st.ReadOnly {
|
||||
s.initializePreviewScheduler()
|
||||
s.initializeImportRoot()
|
||||
}
|
||||
|
||||
s.mustLoadTemplates()
|
||||
|
||||
s.registerStaticRoutes()
|
||||
s.mux.HandleFunc("/_/api/v1/editor/state", s.handleEditorState)
|
||||
s.mux.HandleFunc("/_/api/v1/editor/convert", s.handleEditorConvert)
|
||||
|
||||
s.mux.HandleFunc(
|
||||
"/o/e/",
|
||||
@@ -99,8 +108,10 @@ func New(
|
||||
|
||||
s.registerRoutes()
|
||||
|
||||
s.startGCWorker()
|
||||
s.startEventScheduler()
|
||||
if !st.ReadOnly && !st.BackgroundJobsDisabled {
|
||||
s.startGCWorker()
|
||||
s.startEventScheduler()
|
||||
}
|
||||
|
||||
return s
|
||||
}
|
||||
@@ -348,6 +359,7 @@ func (s *Server) handler() http.Handler {
|
||||
domainHandler.ServeHTTP(w, r)
|
||||
})
|
||||
|
||||
h = s.withStandbyReadOnly(h)
|
||||
h = mw.NormalizePath(h)
|
||||
h = mw.RequestID(h)
|
||||
h = mw.Logging(h)
|
||||
|
||||
Reference in new issue
Block a user