nesquena / backburner

Simple and reliable beanstalkd job queue for ruby
http://nesquena.github.com/backburner
MIT License
428 stars 68 forks source link

Round robin among different backburners? #112

Closed funkyboy closed 8 years ago

funkyboy commented 8 years ago

I have backburner running on different machines. From a central machine I'd like to enqueue jobs on the different machines in a round robin fashion. Ideally:

# from central machine
b1 = # Backburner on machine 1 
b2 = # Backburner on machine 2

b1.enqueue
b2.enqueue
b1.enqueue
...

AFAICT, reading the examples, this doesn't seem to be possible.

Am I missing something? Is there an alternative? All I am asking is if there's a way to call enqueue on an instance of Backburner initialized with a specific ip address.

contentfree commented 8 years ago

Are you meaning that you're running multiple beanstalkd servers? (Backburner is a beanstalkd client and not a server itself.)

For most job loads, you'd normally run a central beanstalkd server and then have many clients (Backburner et al) that connect to it.

And then you could have a particular server, like a web app, enqueuing lots of jobs that would be worked by the clients.

Make sense?

funkyboy commented 8 years ago

Yes, makes sense. I misread the documentation. Thanks :)

contentfree commented 8 years ago

Cool. Thanks for closing the issue, too