I need to access the current celluloid actor inside of my Sidekiq worker, but I don't see a way to do that.
Whenever I try to call:
Celluloid::Actor.current
I get an error: not in actor scope
I tried to get around finding the current actor by creating a new one every time with:
Celluloid::Actor.new(SecureRandom.hex)
But for some reason it was giving me an error of attempted to call dead actor
.
What should I be doing differently to get the current actor inside of a Sidekiq worker?
Background Info I am connecting to a websocket in my worker and sending messages to it.
Celluloid::WebSocket::Client.new('ws://my-uri', Celluloid::Actor.current)