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

This application keeps requesting messages from the database forever #19

Open
anilmuppalla opened this issue Dec 26, 2013 · 5 comments
Open

Comments

@anilmuppalla
Copy link

Why does this app keep making lookup for messages instead of triggering the lookup when needed like on an event after adding a new chat?

@anilmuppalla
Copy link
Author

I am guessing because the worker method on the coffee scripts runs endlessly?

@stephenlb
Copy link
Member

Hi @4ni1 good question. Can you provide details about "keep making lookups" ? This may be our server-ping which is sending a signal to the client in a test to see if the connection is still active.

@blazeroot
Copy link
Contributor

Hi @4ni1, exactly, it works that way because of worker() in coffee. This example shows async subscribe: https://github.com/pubnub/ruby/blob/master/examples/pubnub_livestream/config/initializers/pubnub.rb and worker still is asking if there're any new messages. It (asking ror server) could be implemented better way, but that's not the point of that example app. I kept it as simple as possible, just to show async subscribe in pubnub.

@stephenlb
Copy link
Member

👍 @blazeroot

@anilmuppalla
Copy link
Author

👍@blazeroot @stephenlb Got it thanks guys for the quick response. Please go ahead and close the issue.

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

3 participants