Compare commits

..

2 Commits

Author SHA1 Message Date
e441a22fc8 removed server id fully 2026-04-27 23:18:21 +02:00
4822b83069 removed server id 2026-04-27 23:17:50 +02:00
3 changed files with 1 additions and 4 deletions

View File

@@ -30,8 +30,6 @@ def write_event(event, game: str) -> bool:
try: try:
p = Point(event.type).time(event.time * 1_000_000_000) p = Point(event.type).time(event.time * 1_000_000_000)
p.tag("game", game) p.tag("game", game)
p.tag("serverId", event.serverId)
# Ensure data is a dict, even if not provided
for k, v in (event.data or {}).items(): for k, v in (event.data or {}).items():
if isinstance(v, (int, float, str, bool)): if isinstance(v, (int, float, str, bool)):
p.field(k, v) p.field(k, v)

View File

@@ -3,7 +3,7 @@ from fastapi.responses import JSONResponse, FileResponse
from fastapi.security import HTTPBasic, HTTPBasicCredentials from fastapi.security import HTTPBasic, HTTPBasicCredentials
from .auth import init_db, verify_api_key, get_db from .auth import init_db, verify_api_key, get_db
from .models import Event, BatchEvents from .models import Event, BatchEvents
from .influx import write_event, client, INFLUX_ORG, INFLUX_BUCKET from .influx import write_ev3t, client, INFLUX_ORG, INFLUX_BUCKET
import logging import logging
import os import os
import secrets import secrets

View File

@@ -4,7 +4,6 @@ from typing import Any, List, Optional
class Event(BaseModel): class Event(BaseModel):
type: str type: str
time: int time: int
serverId: str
data: Optional[dict] = {} data: Optional[dict] = {}
class BatchEvents(BaseModel): class BatchEvents(BaseModel):