Sidekiq shut down

 

Im using Sidekiq for background operations of my Rails 4.1 app.

When I type Ctrl+C to shutdown Sidekiq, Sidekiq catches the signal but seems to freeze after this last log line:

 

^C2014-09-18T16:17:19.194Z 20686 TID-ovwtinh0g INFO: Shutting down
2014-09-18T16:17:21.041Z 20686 TID-ovwtixflc INFO: Shutting down 25 quiet workers

 

Thus, I need another terminal window where I need to type:

 

bundle exec sidekiqctl stop pidfile

 

This is really inconvenient (and takes about 8 seconds) and I can't find why Sidekiq won't stop properly with Ctrl+C.

 

modify the Gemfile and exec bundle install

 

gem 'celluloid','0.15.2'
gem 'sidekiq','3.2.5'

➜  test_resque_rails4.1.5  sidekiq           

         s
          ss
     sss  sss         ss
     s  sss s   ssss sss   ____  _     _      _    _
     s     sssss ssss     / ___|(_) __| | ___| | _(_) __ _
    s         sss         \___ \| |/ _` |/ _ \ |/ / |/ _` |
    s sssss  s             ___) | | (_| |  __/   <| | (_| |
    ss    s  s            |____/|_|\__,_|\___|_|\_\_|\__, |
    s     s s                                           |_|
          s s
         sss
         sss

2014-12-11T03:09:08.342Z 52111 TID-ovavd4ue8 INFO: Running in ruby 2.1.1p76 (2014-02-24 revision 45161) [x86_64-darwin13.0]
2014-12-11T03:09:08.342Z 52111 TID-ovavd4ue8 INFO: See LICENSE and the LGPL-3.0 for licensing details.
2014-12-11T03:09:08.342Z 52111 TID-ovavd4ue8 INFO: Upgrade to Sidekiq Pro for more features and support: http://sidekiq.org/pro
2014-12-11T03:09:08.342Z 52111 TID-ovavd4ue8 INFO: Starting processing, hit Ctrl-C to stop
2014-12-11T03:09:08.369Z 52111 TID-ovavlw9os INFO: Booting Sidekiq 3.2.5 with redis options {}

 

ctrl + c to shut down


^C2014-12-11T03:09:11.715Z 52111 TID-ovavd4ue8 INFO: Shutting down
2014-12-11T03:09:12.091Z 52111 TID-ovavlw9os INFO: Shutting down 25 quiet workers

 

你可能感兴趣的:(sidekiq,ctrl+c,shut down)