Go to file
Rogério Lima 3eca55578d perf: dedup vinculo per-cpf refetch, add retry/pooling, freeze carga horaria on FORMADO
Skip re-fetching a CPF from the per-pessoa Gennera loop when the bulk
ingressantes step already resolved it for the same ano, cutting
redundant HTTP fan-out. Add bounded retry with backoff on transient
connection errors (never on HTTP status errors) across the four Gennera
fetch functions, backed by a shared requests.Session for connection
reuse instead of one-off urllib calls. Also stop syncing
carga_horaria_integralizada from the API once a vinculo is FORMADO,
matching the existing sticky-situacao rule, in both the vinculo import
and the standalone carga-horaria command.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-06 18:02:00 -03:00
config feat: protect manual edits from API overwrite, fix pending situacao, sort CRUD lists 2026-07-06 15:39:36 -03:00
core perf: dedup vinculo per-cpf refetch, add retry/pooling, freeze carga horaria on FORMADO 2026-07-06 18:02:00 -03:00
docs feat: initialize autocensup application 2026-07-05 11:56:19 -03:00
templates feat: protect manual edits from API overwrite, fix pending situacao, sort CRUD lists 2026-07-06 15:39:36 -03:00
.env.example feat: protect manual edits from API overwrite, fix pending situacao, sort CRUD lists 2026-07-06 15:39:36 -03:00
.gitignore feat: initialize autocensup application 2026-07-05 11:56:19 -03:00
.python-version feat: initialize autocensup application 2026-07-05 11:56:19 -03:00
docker-compose.yml feat: initialize autocensup application 2026-07-05 11:56:19 -03:00
ESPECIFICACOES.md feat: protect manual edits from API overwrite, fix pending situacao, sort CRUD lists 2026-07-06 15:39:36 -03:00
ETAPAS.md feat: initialize autocensup application 2026-07-05 11:56:19 -03:00
main.py feat: initialize autocensup application 2026-07-05 11:56:19 -03:00
Makefile feat: initialize autocensup application 2026-07-05 11:56:19 -03:00
manage.py feat: initialize autocensup application 2026-07-05 11:56:19 -03:00
pyproject.toml perf: dedup vinculo per-cpf refetch, add retry/pooling, freeze carga horaria on FORMADO 2026-07-06 18:02:00 -03:00
README.md feat: initialize autocensup application 2026-07-05 11:56:19 -03:00
REGRAS_VINCULO.md feat: initialize autocensup application 2026-07-05 11:56:19 -03:00
uv.lock perf: dedup vinculo per-cpf refetch, add retry/pooling, freeze carga horaria on FORMADO 2026-07-06 18:02:00 -03:00

Autocensup

Aplicacao Django configurada para usar PostgreSQL.

Requisitos

  • Python 3.12+
  • uv
  • Docker e Docker Compose

Como rodar

Crie o arquivo de ambiente:

cp .env.example .env

Instale as dependencias:

UV_CACHE_DIR=/tmp/uv-cache uv sync

Suba o PostgreSQL:

docker compose up -d db

Execute as migracoes:

UV_CACHE_DIR=/tmp/uv-cache uv run python manage.py migrate

Carregue as UFs e municipios:

UV_CACHE_DIR=/tmp/uv-cache uv run python manage.py loaddata ufs municipios

Inicie o servidor:

UV_CACHE_DIR=/tmp/uv-cache uv run python manage.py runserver

A aplicacao ficara disponivel em http://127.0.0.1:8000/.

Comandos uteis

UV_CACHE_DIR=/tmp/uv-cache uv run python manage.py createsuperuser
UV_CACHE_DIR=/tmp/uv-cache uv run python manage.py test