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

Introducing SuckerPunch breaks Celluloid::Notifications functionality #114

Closed sslotsky closed 9 years ago

sslotsky commented 9 years ago

I recently introduced SuckerPunch to do some work that I was previously doing with DelayedJob. I was already using Celluloid actors & notifications successfully in my project to do some other processing. The newly wired SuckerPunch jobs work fine, but attempting to execute the code that uses notifications raises a DeadActorError with the message "notifications fanout actor not running"

This error is raised as soon as I instantiate a subscriber:

class SnapshotListener
  include Celluloid
  include Celluloid::Notifications
  include Celluloid::Logger

  def initialize(snapshot)
    @snapshot = snapshot
    subscribe(register_channel, :schedule_page)
    subscribe(complete_channel, :complete_page)
  end

  ...
end

This code is executed from the main thread in an ActiveRecord callback after a form is submitted. When I remove SuckerPunch from my project, the notifications work again.

sslotsky commented 9 years ago

My mistake here, it was not SuckerPunch but rather a websockets library that was causing the problem. Closing.

Nope, it's still SuckerPunch doing it.

brandonhilkert commented 9 years ago

It may be related to https://github.com/brandonhilkert/sucker_punch/pull/113

sslotsky commented 9 years ago

That seems likely! I will keep this open until that is merged and retest. Thanks!

brandonhilkert commented 9 years ago

v 1.5.0 has been released. Please try that version and see if you still have issues.

brandonhilkert commented 9 years ago

Closing since I haven't heard back.

sslotsky commented 9 years ago

@brandonhilkert Sorry I did not respond, this is indeed fixed. Thanks!

brandonhilkert commented 9 years ago

Great to hear. Thanks for the follow-up!