Merge: pipeline stages run on their own OpenCode service with stage-only limits
This commit is contained in:
@@ -144,6 +144,9 @@ func main() {
|
||||
defer chats.Close()
|
||||
}
|
||||
srv := &http.Server{Addr: *addr, Handler: server.HandlerWithOptions(ctx, options, store), ReadHeaderTimeout: 5 * time.Second}
|
||||
// Deferred before WaitRuns so it runs after the runs settle: the owned stage
|
||||
// service is stopped only when no stage session is still active on it.
|
||||
defer opencode.StopIdleStageService()
|
||||
defer server.WaitRuns(srv.Handler)
|
||||
go func() {
|
||||
<-ctx.Done()
|
||||
|
||||
Reference in New Issue
Block a user