MCPcopy
hub / github.com/robfig/cron / Then

Method Then

chain.go:30–35  ·  view source on GitHub ↗

Then decorates the given job with all JobWrappers in the chain. This: NewChain(m1, m2, m3).Then(job) is equivalent to: m1(m2(m3(job)))

(j Job)

Source from the content-addressed store, hash-verified

28// is equivalent to:
29// m1(m2(m3(job)))
30func (c Chain) Then(j Job) Job {
31 for i := range c.wrappers {
32 j = c.wrappers[len(c.wrappers)-i-1](j)
33 }
34 return j
35}
36
37// Recover panics in wrapped jobs and log them with the provided logger.
38func Recover(logger Logger) JobWrapper {

Callers 5

TestChainFunction · 0.80
TestChainRecoverFunction · 0.80
ScheduleMethod · 0.80

Calls

no outgoing calls

Tested by 4

TestChainFunction · 0.64
TestChainRecoverFunction · 0.64