9z0b3t1c/capistrano-resque

different workers set for each server

Closed this issue · 3 comments

Hello,

It would be helpful to be able to configure specific sets of workers for specific servers. For example:

role :slow_worker, 'A'
role :fast_worker, 'X'
set :workers, { :slow_worker => { 'easy_task' => 1, 'other_easy_task' => 2 }, :fast_worker => { 'heavy_lifting' => 1, ... } }

For example, in our setup, we have some large servers on which we would like to run resource intensive image processing tasks, and some lighter servers on which we would run easier tasks.

I believe the helper methods (remote_file_exists?, remote_process_exists? and current_pids) should expect a new, optional parameter 'role' and only the start task must be changed to send the role parameter.

Do you believe this would be a useful addition to capistrano-resque ?

Sure, I think that sounds useful. :)

You probably can close this one then =)

You're right. :)