Middleware can wrap any job execution, allowing to execution code before or/and after of each `Job.Run`
| 179 | // Middleware can wrap any job execution, allowing to execution code before |
| 180 | // or/and after of each `Job.Run` |
| 181 | type Middleware interface { |
| 182 | // Run is called instead of the original `Job.Run`, you MUST call to `ctx.Run` |
| 183 | // inside of the middleware `Run` function otherwise you will broken the |
| 184 | // Job workflow. |
| 185 | Run(*Context) error |
| 186 | // ContinueOnStop, If return true the Run function will be called even if |
| 187 | // the execution is stopped |
| 188 | ContinueOnStop() bool |
| 189 | } |
| 190 | |
| 191 | type middlewareContainer struct { |
| 192 | m map[string]Middleware |