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

Make Sucker Punch stay quiet on exit #158

Closed dhh closed 8 years ago

dhh commented 8 years ago

We're using Sucker Punch for development testing with Basecamp 3 (thanks!) and I just tried v2. Lovely to see it do without the Celluloid dependency, but I'd love if it also would stay quiet on exit. Here's what I'm getting:

Marbella-iMac:bc3 david$ r c
Running via Spring preloader in process 7787
Loading development environment (Rails 5.0.0.beta1)
irb(main):001:0> exit
Shutdown triggered...executing remaining in-process jobs
Remaining jobs have finished
All is quiet...byebye

Maybe redirect output like that to a log file and make that optional?

brandonhilkert commented 8 years ago

Hey David! The logger can be set. Would that work for you?

dhh commented 8 years ago

Ah, I see that the logger actually already is set to Rails.logger by default! So it's actually doing "the right thing". It's just still overly verbose, imo, when you start the console that it gives you that much info on exit. Especially since it isn't prefixed.

What do you think about just staying quiet unless there are jobs to run still pending? In the tradition of "if all is well, don't tell".

On Sun, Jan 24, 2016 at 3:52 PM, Brandon Hilkert notifications@github.com wrote:

Hey David! The logger can be set https://github.com/brandonhilkert/sucker_punch#logger. Would that work for you?

— Reply to this email directly or view it on GitHub https://github.com/brandonhilkert/sucker_punch/issues/158#issuecomment-174305833 .

brandonhilkert commented 8 years ago

Fair point. That makes sense. I'll push a change for that later today and let you know.

dhh commented 8 years ago

🙏

On Sun, Jan 24, 2016 at 3:58 PM, Brandon Hilkert notifications@github.com wrote:

Fair point. That makes sense. I'll push a change for that later today and let you know.

— Reply to this email directly or view it on GitHub https://github.com/brandonhilkert/sucker_punch/issues/158#issuecomment-174306267 .

brandonhilkert commented 8 years ago

Give 2.0.0.beta2 a shot and lemme know!

dhh commented 8 years ago

Perfecto! Thanks again for the crazy fast turn-around.

On Sun, Jan 24, 2016 at 4:13 PM, Brandon Hilkert notifications@github.com wrote:

Give 2.0.0.beta2 a shot and lemme know!

— Reply to this email directly or view it on GitHub https://github.com/brandonhilkert/sucker_punch/issues/158#issuecomment-174308066 .

brandonhilkert commented 8 years ago

@dhh FYI - 2.0.0 was officially released this morning. No changes from 2.0.0.beta2.

dhh commented 8 years ago

👍

On Tue, Jan 26, 2016 at 2:59 PM, Brandon Hilkert notifications@github.com wrote:

@dhh https://github.com/dhh FYI - 2.0.0 was officially released this morning. No changes from 2.0.0.beta2.

— Reply to this email directly or view it on GitHub https://github.com/brandonhilkert/sucker_punch/issues/158#issuecomment-175028693 .