internal

package
v0.40.0 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2023 License: AGPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	JobStatusNew       = "new"
	JobStatusProcessed = "processed"
	JobStatusFailed    = "failed"
)

Variables

View Source
var JobCtxVarKey contextKey

Functions

func CalculateBackoff

func CalculateBackoff(retryCount int) time.Time

CalculateBackoff calculates the number of seconds to back off before the next retry this formula is unabashedly taken from Sidekiq because it is good.

func RandInt

func RandInt(max int) int

RandInt returns a random integer up to max

func StripNonAlphanum

func StripNonAlphanum(s string) string

StripNonAlphanum strips nonalphanumeric/non underscore characters from a string and returns a new one

Types

This section is empty.

Jump to

Keyboard shortcuts

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