Skip to content

Fix/valkey index ttl and reindex window#110

Merged
Benevanio merged 2 commits into
developfrom
fix/valkey-index-ttl-and-reindex-window
Jun 7, 2026
Merged

Fix/valkey index ttl and reindex window#110
Benevanio merged 2 commits into
developfrom
fix/valkey-index-ttl-and-reindex-window

Conversation

@Benevanio

Copy link
Copy Markdown
Collaborator

No description provided.

hltav added 2 commits June 5, 2026 10:20
…la vazia durante reindexação

Problemas resolvidos:
- scraper:jobs:index expirava em 72h, causando API vazia entre execuções semanais
- jobTTL de 72h insuficiente para cobrir o intervalo de scraping de 7 dias
- Del nos índices de keyword criava janela de vazio durante reindexação (até 40min)

Mudanças em internal/jobstore/jobstore.go:
- Remove Expire(indexKey) do pipeline por vaga — índice global agora é permanente
- Aumenta jobTTL de 72h para 9 dias (> janela de 7 dias do filtro r604800)
- IDs órfãos continuam sendo removidos organicamente pelo GetAll via SRem

Mudanças em internal/pipeline/pipeline.go:
- Substitui Del + reindexação direta por estratégia blue/green com chaves :next
- Escreve novo índice em scraper:jobs:keyword:<kw>:next, depois RENAME atômico
- RENAME garante que clientes nunca vejam chave vazia durante reindexação
- Aumenta indexTTL de 72h para 9 dias, alinhado com jobTTL
- Índice global (scraper:jobs:index) permanece sem TTL
@vercel

vercel Bot commented Jun 7, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
painel-vagas Ready Ready Preview, Comment Jun 7, 2026 9:43pm

@Benevanio
Benevanio merged commit 8f1a84a into develop Jun 7, 2026
3 checks passed
@github-project-automation github-project-automation Bot moved this from Backlog to Done in JobAtlas – Kanban Jun 7, 2026
@Benevanio
Benevanio deleted the fix/valkey-index-ttl-and-reindex-window branch June 7, 2026 21:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants