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

How to stop dashing-rails web app auto reload #82

Open
muhammadusmanarshad opened this issue Nov 23, 2015 · 12 comments
Open

How to stop dashing-rails web app auto reload #82

muhammadusmanarshad opened this issue Nov 23, 2015 · 12 comments

Comments

@muhammadusmanarshad
Copy link

I have web app using dashing-rails but my app auto reload after sometime. Is there anyway to stop auto reloading?

@gottfrois
Copy link
Owner

What do you mean auto-reload? automatic refresh on the browser?

@muhammadusmanarshad
Copy link
Author

yes, my browser automatic refresh after every 5 min. Is there anyway we can stop this?

@gottfrois
Copy link
Owner

The only place I see we do a refresh is here https://github.com/gottfrois/dashing-rails/blob/master/vendor/assets/javascripts/dashing/dashing-src.coffee#L107

But it's supposed to happen because of a connection error. Is it your case?

@muhammadusmanarshad
Copy link
Author

Yes this my case, and I don't want this thing. Is there anyway to stop this?

@gottfrois
Copy link
Owner

It means you have issues connecting to the event source. Don't you want to fix that instead ? :)

@muhammadusmanarshad
Copy link
Author

:) My app is such that, these errors occur mostly but not effect my app performance, That's y i need to stop this. :)

@gottfrois
Copy link
Owner

Fork and try to remove those lines https://github.com/gottfrois/dashing-rails/blob/master/vendor/assets/javascripts/dashing/dashing-src.coffee#L105-L107

There are no way to configure this at this point

@holgersindbaek
Copy link

@gottfrois @muhammadusmanarshad I'm having this same issue. As far as I can read on the code you pointed to, it's related to the connection being lost.

I'm using Mongoid, so I haven't been able to ad the code in the following file "config/initializers/database_connection.rb". Could that have something to do with it?

It seems to be only happening on Heroku in production. Do I need to upgrade the web or worker you think?

@gottfrois
Copy link
Owner

The code in config/initializers/database_connection.rb is ActiveRecord related. You might want to search if there is any equivalents for MongoDB but it's database related anyway.

It seems that you guys are having issues with the websocket connection dropping out, which cause a browser refresh. I am not an expert with EventSource library so I would first start looking at https://github.com/Shopify/dashing to see if there are similar issues. I did not upgrade dashing-rails with dashing latest JS code recently.

@holgersindbaek
Copy link

@gottfrois Which version of Dashing Rails are you using then?

I'm still not sure how the database connection file relates to dashing in any way, dashing is not saving anything in the database, right?!

@gottfrois
Copy link
Owner

No it's not persisting anything in database. But dashing-rails is just an engine which is likely to be installed on a rails application running a database. But I don't think your issue is related to database connection issue with dashing-rails.

@holgersindbaek
Copy link

Ok. Thanks for clarifying.

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