Open muhammadusmanarshad opened 8 years ago
What do you mean auto-reload? automatic refresh on the browser?
yes, my browser automatic refresh after every 5 min. Is there anyway we can stop this?
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?
Yes this my case, and I don't want this thing. Is there anyway to stop this?
It means you have issues connecting to the event source. Don't you want to fix that instead ? :)
:) My app is such that, these errors occur mostly but not effect my app performance, That's y i need to stop this. :)
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
@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?
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.
@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?!
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.
Ok. Thanks for clarifying.
I have web app using dashing-rails but my app auto reload after sometime. Is there anyway to stop auto reloading?