-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsettings.toml
More file actions
51 lines (42 loc) · 1.95 KB
/
Copy pathsettings.toml
File metadata and controls
51 lines (42 loc) · 1.95 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
[default]
GEE_SERVICE_ACCOUNT_FILE='/app/.service-accounts/gee.json'
LIFESPAN_URL = 24 # Aumentado para 24 horas
# Timeout total (segundos) por tentativa de download de tile do EE.
# 10s era insuficiente sob carga (EE responde em 8–12s); 20s reduz
# TimeoutErrors sem prolongar excessivamente requests com EE realmente lento.
HTTP_GET_BYTES_TIMEOUT = 20
# Cache híbrido
REDIS_URL = 'redis://valkey:6379'
S3_ENDPOINT = 'http://minio:9000'
S3_ACCESS_KEY = 'minioadmin'
S3_SECRET_KEY = 'minioadmin'
S3_BUCKET = 'tiles-cache'
# Performance
WORKERS = 20 # Ajustar baseado em CPUs disponíveis
MAX_WORKERS_EE = 20 # Threads para requisições ao GEE por worker
WORKER_CONNECTIONS = 2000
MAX_REQUESTS = 20000
MAX_REQUESTS_JITTER = 1000
# Rate limiting - aumentado para suportar carregamento de múltiplos anos/tiles
RATE_LIMIT_PER_MINUTE = 100000 # Por IP - para tiles Landsat/Sentinel
RATE_LIMIT_BURST = 10000
# Celery Configuration
CELERY_BROKER_URL = 'redis://valkey:6379/1'
CELERY_RESULT_BACKEND = 'redis://valkey:6379/2'
MONGODB_URL='mongodb://localhost:27017'
MONGODB_DB='tvi'
USE_MONGODB_VIS_PARAMS=true # Set to true after running migration script
# Hosts liberados no proxy de COG (open relay é bloqueado por padrão)
COG_ALLOWED_HOSTS = ['data.inpe.br']
# TVI moderno (tvi-api) — tokens GEE efêmeros por campanha
# (POST /internal/gee/token; vazio desabilita o caminho por credencial)
TVI_API_URL = ''
TVI_INTERNAL_TOKEN = ''
# GEE Service Account Pool
GEE_SA_DIRECTORY = '/app/.service-accounts/'
GEE_SA_COOLDOWN_SECONDS = 60 # Cooldown após 429 (segundos)
GEE_SA_HTTP_COOLDOWN_SECONDS = 15 # Cooldown após 429 do download HTTP de tile (s)
GEE_SA_MAX_RETRIES = 2 # Máximo de rotações de SA por requisição
GEE_SA_HEARTBEAT_INTERVAL = 30 # Intervalo de heartbeat (segundos)
GEE_SA_ASSIGNMENT_TTL = 90 # TTL do assignment no Redis (segundos)
GEE_SA_ACQUIRE_TIMEOUT_SECONDS = 2 # Máximo aceitável de espera no acquire antes de retornar 503