brandonhilkert / sucker_punch

Sucker Punch is a Ruby asynchronous processing library using concurrent-ruby, heavily influenced by Sidekiq and girl_friday.
MIT License
2.64k stars 114 forks source link

Pool size #106

Closed bighoax closed 9 years ago

bighoax commented 9 years ago

Hello, I haven't been able to find this info so I've opened a new issue, even though it's not really an issue. I use jRuby with rails, my question is there a way to configure a worker pool?

I'm currently using this gem for sending emails, works awesome so far.

brandonhilkert commented 9 years ago

What specifically about it? Each job is given its own pool.

On Monday, March 23, 2015, bighoax notifications@github.com wrote:

Hello, I haven't been able to find this info so I've opened a new issue, even though it's not really an issue. I use jRuby with rails, my question is there a way to configure a worker pool?

I'm currently using this gem for sending emails, works awesome so far.

— Reply to this email directly or view it on GitHub https://github.com/brandonhilkert/sucker_punch/issues/106.


_Build a Ruby Gem is available! http://brandonhilkert.com/books/build-a-ruby-gem/?utm_source=gmail-sig&utm_medium=email&utm_campaign=gmail_

http://brandonhilkert.com

bighoax commented 9 years ago

Hi Brandon,

What is the size of the pool given to each job, is there a default value?

Also from what I understand from here : https://github.com/celluloid/celluloid/wiki/Pools

I can specify the pool size. Can I somehow configure pool size for a particular job? I'm currently using this gem to send out emails in the background from a job.

Let's say that the pool size (number of available workers) is 5, but at the given time there is 10 users doing some action which requires email notification, so it should only send 5 each time. Is that how it works now?

I just moved from Heroku and running on MRI to jruby on AWS and managed infrastructure, so there were so many things taken care of by Heroku and now I need to research what every component does in details.

THanks

brandonhilkert commented 9 years ago

This is covered in the README.

screen shot 2015-03-24 at 12 47 03 pm

Yup, it works as you describe.

bighoax commented 9 years ago

thanks @brandonhilkert I was reading the README late last night and missed that part. Thanks for getting back at me I'll close this issue.