Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Async calling you must be running inside an eventmachine loop #41

Closed
akshayrawat opened this issue Mar 9, 2013 · 1 comment
Closed

Comments

@akshayrawat
Copy link

I'm using unicorn with trigger_async, and also have em-http-request in the Gemfile.

Running Rails, with pusher-gem (master), on Heroku.

I get:

Pusher::Error (In order to use async calling you must be running inside an eventmachine loop):
@mloughran
Copy link
Contributor

Yes, that's the way it works I'm afraid. Unicorn isn't built on top of eventmachine, thus you don't have the loop running.

It would be nice to support async triggering in rails that just works, but I haven't been able to devote any time to this as yet. For now, starting an eventmachine loop in a thread should work (Thread.new { EM.run }), but you should verify how this plays with the unicorn forking model.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants