Quebert jobs raise classes that are caught by Quebert controllers to manage job life-cycles. Refactor jobs to call methods on the controller. e.g. job.retry could call controller.retry(job) if the retry method is present on the controller (or have a base controller that doesn't perform an operation on a retry).
All of the exceptions implemented at https://github.com/polleverywhere/quebert/blob/multiple-tubes/lib/quebert/job.rb#L24-33 should be moved into a controller. Then methods like https://github.com/polleverywhere/quebert/blob/multiple-tubes/lib/quebert/job.rb#L94-105 can be delegated to said controller to deal with all job concerns in relation to the backend.
Quebert jobs raise classes that are caught by Quebert controllers to manage job life-cycles. Refactor jobs to call methods on the controller. e.g.
job.retrycould callcontroller.retry(job)if the retry method is present on the controller (or have a base controller that doesn't perform an operation on a retry).All of the exceptions implemented at https://github.com/polleverywhere/quebert/blob/multiple-tubes/lib/quebert/job.rb#L24-33 should be moved into a controller. Then methods like https://github.com/polleverywhere/quebert/blob/multiple-tubes/lib/quebert/job.rb#L94-105 can be delegated to said controller to deal with all job concerns in relation to the backend.