feat(storage): add native PostgreSQL runtime and verified offline application import
Build and publish container images / images (push) Failing after 12m29s

This commit is contained in:
Anya Tokugawa committed 2026-11-15 05:47:14 +09:00
1 parent 96065d1e89
commit 0ba1dcfef0
243 files changed
+21441 -3090

No files matched your search

+35
View File
@@ -0,0 +1,35 @@
package main
import (
"context"
"pageswiki/internal/server"
"pageswiki/internal/store"
)
// Let an in-flight federation reconciliation finish before releasing the
// event-worker owner. Each remote request retains its existing network timeout;
// cancellation prevents starting another campus or reconciliation pass.
func serveInstance(ctx context.Context, dataDir string, st *store.Store, addr string) error {
srv, err := server.NewChecked(st)
if err != nil {
return err
}
reconcileCtx, stopReconciler := context.WithCancel(ctx)
reconcilerDone := startManagedCampusReconciler(reconcileCtx, dataDir, st)
serveCtx, stopServer := context.WithCancel(context.Background())
finished := make(chan struct{})
go func() {
select {
case <-ctx.Done():
<-reconcilerDone
stopServer()
case <-finished:
}
}()
err = srv.RunContext(serveCtx, addr)
stopReconciler()
<-reconcilerDone
close(finished)
stopServer()
return err
}