Fix email sync (#5132)

This commit is contained in:
Charles Bochet
2024-04-23 18:50:37 +02:00
committed by GitHub
parent 444e97fa3e
commit fafa56411c
3 changed files with 21 additions and 3 deletions

18
.vscode/launch.json vendored
View File

@ -3,7 +3,7 @@
"resolveSourceMapLocations": ["${workspaceFolder}/**", "!**/node_modules/**"],
"configurations": [
{
"name": "twenty-server - dev debug",
"name": "twenty-server - start debug",
"type": "node",
"request": "launch",
"runtimeExecutable": "yarn",
@ -17,6 +17,22 @@
"internalConsoleOptions": "openOnSessionStart",
"console": "internalConsole",
"cwd": "${workspaceFolder}/packages/twenty-server/"
},
{
"name": "twenty-server - worker debug",
"type": "node",
"request": "launch",
"runtimeExecutable": "yarn",
"runtimeVersion": "18",
"runtimeArgs": [
"nx",
"run",
"twenty-server:worker",
],
"outputCapture": "std",
"internalConsoleOptions": "openOnSessionStart",
"console": "internalConsole",
"cwd": "${workspaceFolder}/packages/twenty-server/"
}
]
}

View File

@ -55,9 +55,11 @@ export class CacheStorageService {
return this.get(key).then((res: string[]) => {
if (res) {
this.set(key, res.slice(0, -size));
return res.slice(-size);
}
return res;
return [];
});
}

View File

@ -1 +1 @@
export const GMAIL_USERS_MESSAGES_GET_BATCH_SIZE = 50;
export const GMAIL_USERS_MESSAGES_GET_BATCH_SIZE = 10;