utils

package
v0.0.0-...-d39b95d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 5, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// DefaultBackOff is the max backoff period, exported for the e2e test
	DefaultBackOff = 10 * time.Second
	// MaxBackOff is the max backoff period, exported for the e2e test
	MaxBackOff = 360 * time.Second
	// DefaultBackoffLimit for Jobs
	DefaultBackoffLimit = 0
	// DefaultRestartPolicy for Jobs
	DefaultRestartPolicy = "Never"
	// ZeroValue
	ZeroValue = 0
	// TTLDjustment
	TTLDjustment = 10
	// DefaultNumReplicas
	DefaultNumReplicas = 1
)
View Source
const MainJobContainer = "polyaxon-main"

Polyaxon's default main container name

Variables

This section is empty.

Functions

func GetBackoffLimit

func GetBackoffLimit(backoffLimit *int32) *int32

GetBackoffLimit utils function to handle default case

func GetNumReplicas

func GetNumReplicas(numReplicas *int32, defaultValues ...int32) *int32

GetNumReplicas utils function to handle default case

func GetTTL

func GetTTL(ttlSecondsAfterFinished *int32) *int32

GetTTL adjusts backoff in way that Polyaxon has time to finalize the operation

func IgnoreNotFound

func IgnoreNotFound(err error) error

IgnoreNotFound allows to ignore (not requeue) NotFound errors, since we'll get a reconciliation request once the object exists, and requeuing in the meantime won't help, and we can get them on deleted requests.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL