jimsynz / faye-rails

Simple Rails glue for the Faye messaging protocol.
MIT License
435 stars 79 forks source link

Faye won't work with worker class #47

Open MaRoe opened 11 years ago

MaRoe commented 11 years ago

Hey,

I ran across a strange problem lately: we have some resque workers which have to publish to faye. If I run a worker from rails console everything works fine - if the worker task is started with resque nothing happens. Any hints on that? Content of worker in gist below.

Cheers

Martin

https://gist.github.com/MaRoe/55257240d21f449ae79d

asmatameem commented 10 years ago

I am facing the same issue with faye-rails. When I used PrivatePub (another gem for doing same thing) it works fine even from the worker class (sidekiq worker). With faye-rails, I see that it is publishing the messages but the client never receives it.

jimsynz commented 9 years ago

Are you using the Redis backend? If not then you should probably just do:

client = Faye::Client.new faye_url
client.publish message
MaRoe commented 9 years ago

We use a redis backend.