jeffkreeftmeijer / navvy

Simple Ruby background job processor inspired by delayed_job, but aiming for database agnosticism.
https://jeffkreeftmeijer.com
Other
215 stars 23 forks source link

Namespacing jobs #4

Open eet-nu opened 14 years ago

eet-nu commented 14 years ago

I'm currently developing two seperate apps that run on the same MySQL server. I just introduced navvy in one project, but I'm pretty sure I will be using it in the second project soon.

Because they share the same database, both navvy workers will use the same jobs table. I expect this to cause problems.

In order to prevent these problems I was wondering if there is a way to create jobs in a namespace and let the workers query for just these jobs. If not, consider this a feature request :D!

jeffkreeftmeijer commented 14 years ago

Navvy doesn't have built-in support for this right now. It always expects a single "jobs" table. It should be possible to build something like this in, though. Navvy could allow you to set the table name in the config or something.

Another option would be to start supporting multiple queues in one table and have a navvy for each. I'll look into this. :)

If you have a great idea, please let me know. :)