Skip to content
This repository has been archived by the owner on Feb 24, 2024. It is now read-only.

Add support for background jobs #95

Closed
markbates opened this issue Jan 7, 2017 · 3 comments
Closed

Add support for background jobs #95

markbates opened this issue Jan 7, 2017 · 3 comments
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@markbates
Copy link
Member

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.

@bscott
Copy link

bscott commented Jan 9, 2017

@bscott bscott added the enhancement New feature or request label Jan 21, 2017
@amedeiros
Copy link
Contributor

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.

Configure(worker BaseWorker)
Process(worker BaseWorker)
PerformAsync(worker BaseWorker, args ...interface{})

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=?

@markbates markbates modified the milestone: 0.8.0 Jan 26, 2017
@markbates markbates modified the milestones: 0.8.0, 1.0.0 Mar 27, 2017
@markbates markbates modified the milestones: 1.0.0, 0.9.0 May 4, 2017
@markbates markbates self-assigned this May 4, 2017
markbates added a commit that referenced this issue May 4, 2017
markbates added a commit that referenced this issue May 5, 2017
markbates added a commit that referenced this issue May 5, 2017
markbates added a commit that referenced this issue May 5, 2017
markbates added a commit that referenced this issue May 5, 2017
Add support for background jobs #95
@markbates
Copy link
Member Author

An example adapter for gocraft/work https://github.com/gobuffalo/gocraft-work-adapter

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants