This commit is contained in:
Emily
2025-02-11 14:27:35 +01:00
parent 346eecc928
commit a7ebbc22c0
3 changed files with 4 additions and 2 deletions

1
consumer/.gitignore vendored
View File

@@ -5,5 +5,6 @@ ecosystem.config.cjs
ecosystem.config.js ecosystem.config.js
scripts/start_dev.js scripts/start_dev.js
scripts/start_dev_prod.js
dist dist
src/shared src/shared

View File

@@ -18,6 +18,7 @@
"main": "dist/index.js", "main": "dist/index.js",
"scripts": { "scripts": {
"dev": "node scripts/start_dev.js", "dev": "node scripts/start_dev.js",
"dev_prod": "node scripts/start_dev_prod.js",
"compile": "tsc", "compile": "tsc",
"build": "npm run compile && npm run create_db", "build": "npm run compile && npm run create_db",
"create_db": "cd scripts && ts-node create_database.ts", "create_db": "cd scripts && ts-node create_database.ts",

View File

@@ -52,10 +52,10 @@ async function processStreamEntry(data: Record<string, string>) {
const { pid, sessionHash } = data; const { pid, sessionHash } = data;
const project = await ProjectModel.exists({ _id: pid }); const project = await ProjectModel.exists({ _id: pid });
if (!project) return console.log('No project'); if (!project) return;
const canLog = await checkLimits(pid); const canLog = await checkLimits(pid);
if (!canLog) return console.log('No limits'); if (!canLog) return;
if (eventType === 'event') { if (eventType === 'event') {
await process_event(data, sessionHash); await process_event(data, sessionHash);