Fix server file browse flow

This commit is contained in:
npc0-hue
2026-08-26 22:00:23 +08:00
parent 861ee752ed
commit 6369a8099a
22 changed files with 627 additions and 132 deletions
+4
View File
@@ -8,6 +8,7 @@ import (
)
const maxJobChannelMessageLength = 256
const maxRunJobClaimWaitSeconds = 30
func ValidateRunJobClaim(claim domain.RunJobClaim) error {
var violations []string
@@ -19,6 +20,9 @@ func ValidateRunJobClaim(claim domain.RunJobClaim) error {
violations = append(violations, fmt.Sprintf("capabilities[%d] is required", i))
}
}
if claim.WaitSeconds < 0 || claim.WaitSeconds > maxRunJobClaimWaitSeconds {
violations = append(violations, fmt.Sprintf("waitSeconds must be between 0 and %d", maxRunJobClaimWaitSeconds))
}
return finish(violations)
}