so what did you do to fix it?
Refreshing wof.file_cache doesnāt fix it for me unfortunately
It just worked when I tried it again on a different dayā¦
With āreviewsā, it can also be the rate-limit on the server, which might make it pause for a minute (60 seconds) before resuming again. But if it doesnāt, refreshing the cache file is the usual fix, as others have said.
yeah refresh, that didnāt work, but I am getting this:
Hmm, thatās āservice unavailableā. Could be a temporary glitch in the matrix. But if it persists, Iād ask Tofugu.
Side comment: I noticed that my own WK account stopped working on my own wkstats site due to certain WK API queries taking too long. I havenāt reported it because Iām done with my WK journey and didnāt figure it was a priority. (Plus I know that timed-out queries show up in a report, so theyāll see it eventually, which is soon enough for my purposes)
Little frustrating because under Chrome it works. - Maybe I will just switch to one and only google for heatmap. :-/
Iām in the opposite situation, itās not working for me on chrome so I might have to switch to a different browser for the script until it eventually stops working there too.
So⦠Iāve noticed that on my dashboard the time it takes for the heatmap to load is mostly governed by the Apiv2 retrieval of the reviews via the review cache, which it does with a filter with updated_after.
Iāve locally tweaked it by first checking against the datetime of the last review session. Iām assuming here that there is no point in trying to fetch reviews if theyāve been fetched since the last review session already, regardless of how long ago that was. I think offline reviews on a phone app will also be visible on the review overview page once they are syncāed.
// Modified to only check for new reviews if a review session occurred in the mean time
async function update_data_after_session(data) {
if (!data.cache_version || data.cache_version < cache_version) data = {cache_version, date: "1970-01-01T00:00:00.000Z", reviews: [],}
// insert extra check
var lastReviewSessionDate = wkof.load_file('/review').then(parse_last_review_session, fail_last_review_session);
if (lastReviewSessionDate) {
if (new Date(lastReviewSessionDate).getTime() < new Date(data.date).getTime()) {
// no new review sessions since last fetch, simply returned cached data
return data.reviews;
}
}
// else fetch new
// end insert extra check
let [date, new_reviews] = await fetch_new_reviews(data.date);
if (new_reviews.length) {
for (let new_review of new_reviews) data.reviews.push(new_review);
data.reviews.sort((a,b) => a[0]<b[0] ? -1 : 1);
data.date = date;
save(data);
}
return data.reviews;
//====================
function parse_last_review_session(html) {
return $(html).find('#last-session-date time')[0].getAttribute('datetime');
}
function fail_last_review_session(reason) {
console.log("failed to check last review session date: " + reason);
return null;
}
}
Locally this speeds up the loading of the heatmap considerably (provided Iāve not run review sessions that is). Wondering if you think this is a good idea to include.
Not Kumirei, but I like this idea
Not not Kumirei, but this is a great idea!
Not not Kumirei enough
Hey, absolutely love the script!
Hereās a little bug thatās been bothering me for a while though:
The info spills out and can often be unreadable
Oh, thatās not right! Will look into it when I get the time
Quick question out of interest: does the heatmap fetch all your reviews on each page refresh? If so, why doesnāt it only fetch new reviews since the last fetch, wouldnāt that massively speed it up? Sorry if Iām missing something obvious, Iām just curious about it
The heatmap caches your old reviews
It does cache your reviews, however, the issue is that in the last few months WK has had extremely slow response times on the reviews API, so just fetching the new reviews takes a very long time. @rwesterhof has provided an update to the script which will at least make it faster when there are no new reviews, but I havenāt found the time to merge it yet. Hopefully in a few days
Hello, currently I also have the problem of my reviews not fully loading. I did my reviews on my phone for a while, so I have a lot of new reviews to load, but the last request stays at pending and after about a minute changes to 503 with some errors in the console.
Last time this problem was mentioned here it seems that it went away after a few days, but I wanted to ask if there a some things I could try to fix this. I have cleared the cache, restarted the computer, have only used Open Framework and Heatmap, Open Framework being before Heatmap and i dont have any adblockers installed.
Iām sorry, I have no idea why this is happening. It is very strange that the previous request go through but that one is blocked by CORS. Also it shouldnāt thake that long for the request. Perhaps the CORS issue is related to the long response times weāve been seeing on the reviews endpoint. @Mods do you know if the engineering team has looked into this yet? @skatefriday said they sent you an email in February