Fix debug flow

This commit is contained in:
Manav Rathi 2024-08-09 20:23:46 +05:30
parent 839727393b
commit e7e74c17f8
No known key found for this signature in database
2 changed files with 2 additions and 2 deletions

View File

@ -419,13 +419,14 @@ function convertSuggestionToSearchQuery(option: Suggestion): Search {
async function getAllPeople(limit: number = undefined) {
if (!(await wipClusterEnable())) return [];
if (Math.random() < 0.01) {
if (process.env.NEXT_PUBLIC_ENTE_WIP_CL_FETCH) {
const entityKey = await getEntityKey("person" as EntityType);
const peopleR = await personDiff(entityKey.data);
const r = peopleR.length;
log.debug(() => ["people", peopleR]);
if (r) return [];
return [];
}
let people: Array<Person> = []; // await mlIDbStorage.getAllPeople();

View File

@ -317,7 +317,6 @@ let last: Person[] | undefined;
export const wipClusterEnable = async () => {
if (!isDevBuild || !(await isInternalUser())) return false;
if (!process.env.NEXT_PUBLIC_ENTE_WIP_CL) return false;
if (last) return false;
return true;
};