internal

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2023 License: AGPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

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

Variables

This section is empty.

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 characters from a string and returns a new one TODO Replace `StripNonAlphanum` with strings.ReplaceAll

Types

This section is empty.

Jump to

Keyboard shortcuts

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