telemetry packets limit increased
This commit is contained in:
parent
80e0177be0
commit
7f70ebdd96
4 changed files with 7 additions and 3 deletions
|
|
@ -168,7 +168,7 @@ AUTH_USER_MODEL = 'stratoflights_api.User'
|
||||||
|
|
||||||
REST_FRAMEWORK = {
|
REST_FRAMEWORK = {
|
||||||
'DEFAULT_PAGINATION_CLASS': 'rest_framework.pagination.PageNumberPagination',
|
'DEFAULT_PAGINATION_CLASS': 'rest_framework.pagination.PageNumberPagination',
|
||||||
'PAGE_SIZE': 100,
|
'PAGE_SIZE': 1000,
|
||||||
|
|
||||||
'DEFAULT_SCHEMA_CLASS': 'drf_spectacular.openapi.AutoSchema',
|
'DEFAULT_SCHEMA_CLASS': 'drf_spectacular.openapi.AutoSchema',
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ from rest_framework.response import Response
|
||||||
class CustomLimitOffsetPagination(LimitOffsetPagination):
|
class CustomLimitOffsetPagination(LimitOffsetPagination):
|
||||||
limit_query_param = 'limit'
|
limit_query_param = 'limit'
|
||||||
offset_query_param = 'skip'
|
offset_query_param = 'skip'
|
||||||
max_limit = 100
|
max_limit = 1000
|
||||||
default_limit = 10
|
default_limit = 10
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -50,6 +50,10 @@ class TelemetryPacket(models.Model):
|
||||||
payload = models.JSONField(blank=True, default=dict)
|
payload = models.JSONField(blank=True, default=dict)
|
||||||
raw_data = models.JSONField(blank=True, default=dict)
|
raw_data = models.JSONField(blank=True, default=dict)
|
||||||
created_at = models.DateTimeField(auto_now_add=True)
|
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):
|
class PreditctionTemplate(models.Model):
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@ from zoneinfo import ZoneInfo
|
||||||
from collections import OrderedDict
|
from collections import OrderedDict
|
||||||
|
|
||||||
class TawhiriClient:
|
class TawhiriClient:
|
||||||
BASE_URL = "https://api.v2.sondehub.org/tawhiri"
|
BASE_URL = "http://127.0.0.1:8080/api/v1/prediction"
|
||||||
TIMEOUT = 15
|
TIMEOUT = 15
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue