Remove pre-1.0 production governance surfaces

This commit is contained in:
npc0-hue
2026-08-21 00:06:00 +08:00
parent a7e2e4c6c0
commit da6c8d607e
30 changed files with 89 additions and 429 deletions
+13 -3
View File
@@ -23,7 +23,10 @@ var (
ErrForbidden = errors.New("forbidden")
)
const ServerDeletionForceConfirmation = "FORCE DELETE"
const (
ServerDeletionForceConfirmation = "FORCE DELETE"
runHeartbeatStaleAfter = 2 * time.Minute
)
type ForbiddenError struct {
Reason string
@@ -234,7 +237,7 @@ type CoreService struct {
artifactTransfers map[string]domain.ArtifactTransferSession
artifactPayloads map[string][]byte
artifactTransferSeq uint64
productionMu sync.Mutex
pluginOperationsMu sync.Mutex
sourceRCONCommands *sourceRCONCommandBroker
aiProviderClient AIProviderClient
secretEnvelope SecretEnvelope
@@ -2654,7 +2657,14 @@ func (svc *CoreService) runEndpointHeartbeatCurrent(endpoint domain.RunEndpoint)
if endpoint.LastHeartbeatAt.IsZero() {
return false
}
return !svc.now().After(endpoint.LastHeartbeatAt.Add(capacityHeartbeatStaleAfter))
return !svc.now().After(endpoint.LastHeartbeatAt.Add(runHeartbeatStaleAfter))
}
func maxInt(a, b int) int {
if a > b {
return a
}
return b
}
func validateJobServerTarget(job domain.Job, instance domain.ServerInstance, plugin domain.GamePlugin) error {