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)
| 28 | // is equivalent to: |
| 29 | // m1(m2(m3(job))) |
| 30 | func (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. |
| 38 | func Recover(logger Logger) JobWrapper { |
no outgoing calls