Skip to content

This application keeps requesting messages from the database forever #19

Description

@anilmuppalla

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?

Activity

  1. anilmuppalla commented on Dec 26, 2013

    @anilmuppalla
    Author

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

  2. stephenlb commented on Dec 26, 2013

    @stephenlb
    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.

  3. blazeroot commented on Dec 27, 2013

    @blazeroot
    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.

  4. stephenlb commented on Dec 27, 2013

    @stephenlb
    Member
  5. anilmuppalla commented on Dec 28, 2013

    @anilmuppalla
    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions