Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Websocket for Refresher #53
Actual refresh module is not very nice, this is the internal job:
But during this time, UI is frozen until all requests have it's response from web server.
I think, do all the job in async and leave the Web Ui waiting for webscocket response could increase user experience.
Any idea or comment ?
Why is there a refresh button at all? Wouldn't it be better if there was a background job that kept all feeds refreshed all the time?
Been trying to figure out how things work, and I can't find a background job anywhere. ;p
How do leselys handle if I have not visited leselys for 2 days? Will the 2 days of feeds be missing?
A background job will solve those problems. And everything will be much easier if the web UI just shows what's in the database ;p
That's a great point.
And has you ask if nobody click on refresh button during two days, some feeds will be missed and no chance to recover it.
Do you have any idea how to do background job on Heroku without paying for a worker dyno ?
Create a "/api/refresh-all" api that can be called from anyone. And make http api return instant. Then its a quick background job and might be able to fit withing the 450 dyno worker hours per month. Found some info here.
Other ideas is having two heroku apps that call each other? ;p
Ok so, I have a celery worker which refresh feeds every 10minutes right now.
It's works great on a normal installation and on a two dynos Heroku app.
I think, have two apps which call each other is not a proper solution.