Fix server file browse flow
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user