chore: 成功率を上げる

This commit is contained in:
anatawa12 2023-11-29 21:56:46 +09:00
parent 32fd234796
commit f6b7725e72
No known key found for this signature in database
GPG Key ID: 9CA909848B8E4EA6
1 changed files with 1 additions and 1 deletions

View File

@ -84,7 +84,7 @@ export class FanoutTimelineEndpointService {
const remainingToRead = ps.limit - redisTimeline.length;
// DBからの取り直しを減らす初回と同じ割合以上で成功すると仮定するが、クエリの長さを考えて三倍まで
const countToGet = remainingToRead * Math.ceil(Math.min(1 / lastSuccessfulRate, 3));
const countToGet = remainingToRead * Math.ceil(Math.min(1.1 / lastSuccessfulRate, 3));
noteIds = redisResultIds.slice(readFromRedis, readFromRedis + countToGet);
readFromRedis += noteIds.length;