Documentation
¶
Index ¶
Constants ¶
View Source
const ( // DefaultJobTimeout caps a job that does not set a limit of its own. DefaultJobTimeout = 5 * time.Minute // DefaultTransientFailures is how many failures in a row a job survives quietly. A short // outage of the database or the network is cured by the next tick, so an alert is only // worth raising once the work has been stuck that many runs. DefaultTransientFailures = 3 )
View Source
const DefaultTickInterval = 5 * time.Second
DefaultTickInterval is used when a configured interval is missing or malformed.
Variables ¶
This section is empty.
Functions ¶
func EverySpec ¶
EverySpec turns an interval into a cron spec. A non-positive interval means a broken configuration, and it must not turn into a job running every second.
func Initialize ¶
Initialize builds a scheduler that understands seconds in a cron spec and never starts a second copy of a job that is still running: a task ticking every few seconds would otherwise overlap itself and process the same rows twice.
Types ¶
Click to show internal directories.
Click to hide internal directories.