Don't group different categories

This commit is contained in:
Ajay
2022-01-04 20:39:50 -05:00
parent 7f7cc3a7ca
commit 6a98a215ac
3 changed files with 22 additions and 22 deletions

View File

@@ -4,16 +4,16 @@ import { HashedValue } from "../types/hash.model";
import { Logger } from "./logger";
export const skipSegmentsKey = (videoID: VideoID, service: Service): string =>
`segments.v3.${service}.videoID.${videoID}`;
`segments.v4.${service}.videoID.${videoID}`;
export const skipSegmentGroupsKey = (videoID: VideoID, service: Service): string =>
`segments.groups.v2.${service}.videoID.${videoID}`;
`segments.groups.v3.${service}.videoID.${videoID}`;
export function skipSegmentsHashKey(hashedVideoIDPrefix: VideoIDHash, service: Service): string {
hashedVideoIDPrefix = hashedVideoIDPrefix.substring(0, 4) as VideoIDHash;
if (hashedVideoIDPrefix.length !== 4) Logger.warn(`Redis skip segment hash-prefix key is not length 4! ${hashedVideoIDPrefix}`);
return `segments.v3.${service}.${hashedVideoIDPrefix}`;
return `segments.v4.${service}.${hashedVideoIDPrefix}`;
}
export const reputationKey = (userID: UserID): string =>