Add support for background jobs #95
Comments
I like the idea of being able to bring your own background job system with a single interface to talk to any of them. I messed around a little today with this idea https://github.com/amedeiros/buffalo/blob/workers/workers/workers.go. Let me know what you think. Essentially there is a BaseWorker interface and then another interface for github.com/jrallison/go-workers (GoWorkersWrapper) and another interface for github.com/benmanns/goworker (GoWorkerWrapper) that both require the BaseWorker interface. Then theres just some functions that take the BaseWorker interface as an argument.
The only thing I really didn't like about it was that the two worker systems take different function signatures so the Perform methods are not defined in the BaseWorker interface. Also a better way to start the worker systems ideally something like RunWorkers() that would know which job system to start maybe a CLI option --worker-engine=? |
An example adapter for gocraft/work https://github.com/gobuffalo/gocraft-work-adapter |
It would be great to have an interface to talk to, so people can bring their own background job systems.
By default I would like to ship with one that is compatible with SideKiq.
The text was updated successfully, but these errors were encountered: