telemetry packets limit increased

This commit is contained in:
Vasilisk9812 2026-06-17 00:22:48 +09:00
parent 80e0177be0
commit 7f70ebdd96
4 changed files with 7 additions and 3 deletions

View file

@ -168,7 +168,7 @@ AUTH_USER_MODEL = 'stratoflights_api.User'
REST_FRAMEWORK = {
'DEFAULT_PAGINATION_CLASS': 'rest_framework.pagination.PageNumberPagination',
'PAGE_SIZE': 100,
'PAGE_SIZE': 1000,
'DEFAULT_SCHEMA_CLASS': 'drf_spectacular.openapi.AutoSchema',

View file

@ -4,7 +4,7 @@ from rest_framework.response import Response
class CustomLimitOffsetPagination(LimitOffsetPagination):
limit_query_param = 'limit'
offset_query_param = 'skip'
max_limit = 100
max_limit = 1000
default_limit = 10

View file

@ -50,6 +50,10 @@ class TelemetryPacket(models.Model):
payload = models.JSONField(blank=True, default=dict)
raw_data = models.JSONField(blank=True, default=dict)
created_at = models.DateTimeField(auto_now_add=True)
def __str__(self):
return f"packet {self.satellite} {self.lat} {self.lon} {self.alt} {self.timestamp}"
class Meta:
ordering = ["-timestamp"]
class PreditctionTemplate(models.Model):

View file

@ -6,7 +6,7 @@ from zoneinfo import ZoneInfo
from collections import OrderedDict
class TawhiriClient:
BASE_URL = "https://api.v2.sondehub.org/tawhiri"
BASE_URL = "http://127.0.0.1:8080/api/v1/prediction"
TIMEOUT = 15
@staticmethod