1351: _checkForUpdates runs with 0 interval.
- Fixed
- Review Board
| sitnikov*********@gmai***** (Google Code) (Is this you? Claim this profile.) | |
|
|
|
| Oct. 11, 2009 |
What version are you running?
1.1 alpha 2(dev)
What's the URL of the page containing the problem?
http://reviews.review-board.org/r/2168/diff
What steps will reproduce the problem?
1. Open "view diff" page for any review request
2. Wait 5-10 minutes
3. 17 records per second appear in access_log:
GET /api/json/reviewrequests/2168/last-update/?dummy= HTTP/1.1
What is the expected output? What do you see instead?
There should be an interval of RB.ReviewRequest.CHECK_UPDATES_MSECS
between two lines of "/api/json/.../last-update/"
What operating system are you using? What browser?
Does not matter. I use FireFox, Safari.
Please provide any additional information below.
I believe, the following fragment should be changed:
setTimeout(function() { self._checkForUpdates(); },
self.CHECK_UPDATES_MSECS);
"self.CHECK_UPDATES_MSECS" should be replaced with
RB.ReviewRequest.CHECK_UPDATES_MSECS
When is your install from? You don't say which version. It never said "self.CHECK_UPDATES_MSECS," but "this.CHECK_UPDATES_MSECS" and actually worked fine. We did just change the logic, but it's still fine. Did you modify your copy at all?
-
+ NeedInfo
Actually, I use the "master" branch from the official git repository (http://github.com/reviewboard/reviewboard.git) Here is the link to the source: http://github.com/reviewboard/reviewboard/blob/10b5857f676c598fb6353bb50b54a9f0410f032f/reviewboard/htdocs/media/rb/js/datastore.js#L352 I am not sure whether "this" is much better or not, but I used "RB.ReviewRequest." to be consistent with commit eb6d4c4673983e6901cd9cf7d1893e390c3ff222