The oracle comparison clean-up job is written and never started
Los mantenedores suelen responder en 3 días
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Aptitud para principiantes
- 78/100
- Tipo de issue
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- postgresql, redis, typescript
- Área
- backend, databases, distributed-systems, testing
Línea de trabajo
Lee src/jobs/oracleRetention.ts y el bloque “Lending rate retention” de src/index.ts (líneas 220–249); después, inspecciona los patrones de prueba existentes en src/__tests__/oracleRetention.test.ts. Integra la depuración al iniciar y la cola/el worker en main(), con un temporizador horario con unref'd como alternativa si falla la creación de la cola. El trabajo está completo cuando las pruebas cubren la integración al iniciar y la alternativa de Redis, los fallos de depuración se registran sin detener el servicio y las filas antiguas se depuran cada hora.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Background
src/jobs/oracleRetention.ts is a complete retention job for the
oracle_comparisons table. It has a batched delete
(pruneOldOracleComparisons), a per-network wrapper
(pruneAllNetworksOracleComparisons), a queue, a worker and a schedule
(createOracleRetentionQueue, startOracleRetentionWorker,
scheduleOracleRetention). It has a test, src/__tests__/oracleRetention.test.ts.
Nothing calls it. src/index.ts starts the snapshot, lending-rate and
partition jobs, but it never imports oracleRetention. A search of src/ and
scripts/ finds no caller outside the file itself.
Meanwhile src/services/oracleComparison.ts (line 173) inserts into
oracle_comparisons on every comparison run. So the table only grows.
What to build
Start the job from main() in src/index.ts, the same way the lending-rate
job is started a few lines above:
- run one prune at boot, inside a
try/catchthat logs and continues; - try to start the queue and worker;
- if Redis is not available, close what was created and fall back to an hourly
in-process timer with.unref().
Redis being down must not stop the service and must not stop the pruning.
Where to look
src/jobs/oracleRetention.tssrc/index.ts, the "Lending rate retention" block (lines 220–249) as the
pattern to copydocs/RUNBOOK.mdif it lists the background jobs
Done when
-
oracle_comparisonsrows older thanORACLE_COMPARISON_RETENTION_DAYS
are removed on a running instance (show this on a local database) - The job still runs hourly when Redis is down
- A failed prune is logged and does not crash the process
- A test covers the wiring (job started, fallback used when the queue
cannot be created)
Drips Wave · Complexity: Easy · 100 points
Repo: Divinity-Labs/Lens. Install with npm ci, typecheck with
npx tsc --noEmit, test with npm test. Tests are vitest, not jest.
Running jest reports zero tests and proves nothing.
You cannot reach production. Contributors have no access to the deployed
service or its database. Everything must be provable on your own machine. The
Postgres and Redis in docker-compose.yml are enough.
Five generated files are compared byte for byte: openapi.json /
openapi.yaml, the generated tables in README.md, schema.graphql,
clients/typescript/src/schema.d.ts, and the Prisma baseline
prisma/migrations/0_init/migration.sql. The commands that regenerate them are
in the scripts section of package.json (openapi:gen, readme:gen,
graphql:schema:gen, client:gen) and in docs/database-migrations.md. If a
guard fails and the diff looks identical, it is Windows line endings (CRLF),
not your change.
The database is migrated with prisma migrate deploy. Never use
prisma db push. A change to prisma/schema.prisma needs a new migration
folder and a regenerated baseline, or CI fails. Schema drift is not repaired at
start-up any more.
Start-up must stay forgiving. A boot-time check must never stop the whole
service because one optional dependency (Redis, one network's RPC, one venue)
is down. Report it, do not exit.
A CI job that fails at the install step hides every later step. If your
change touches dependencies, check that the steps after install really ran.
Do not weaken a test to make it pass. Never put a secret, a connection
string, or an RPC URL that contains an API key in code, logs, tests or the PR.
Never shorten a Stellar address or contract id; copy it whole from the repo.
Required: Before submitting, join the contributor Telegram so your work can be tracked and counted toward the Stellar Wave: https://t.me/+fxHXq8f1SwlkZDBk
- Lenguaje dominante
- TypeScript
- Estrellas
- 4
- Forks
- 71
- Merge medio
- 2 d 6 h
- PR fusionados (30 d)
- 24
Preparar el entorno
- Incluye un Dockerfile o un archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de Divinity-Labs/Lens
-
`/price/:assetA/:assetB/history` turns a bad `limit` into a 500 and an unknown pair into an empty 200Posiblemente ocupada @I-frenzy la tomó hoy. Abiertoarea:api difficulty:easy help wanted points:100 Stellar Wave
Dificultad 2/5 1-3 horas Aptitud para principiantes 80/100
Divinity-Labs/Lens#664 ·
Los mantenedores suelen responder en 3 días
-
area:reliability difficulty:easy help wanted points:100 Stellar Wave
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Divinity-Labs/Lens#663 · 1 comentario ·
Los mantenedores suelen responder en 3 días
-
`/status?network=mainnet` is rate limited although `/status` is exemptPosiblemente ocupada @Joyful12-tech la tomó hace 1 día. Abiertoarea:reliability difficulty:easy help wanted points:100 Stellar Wave
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
Divinity-Labs/Lens#662 ·
Los mantenedores suelen responder en 3 días
-
area:ingest difficulty:easy help wanted points:100 Stellar Wave
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Divinity-Labs/Lens#633 ·
Los mantenedores suelen responder en 3 días
-
Webhook retries have no jitter, so failures synchronisePosiblemente ocupada @Richard-tobi la tomó hace 35 días. Abiertoarea:reliability difficulty:easy help wanted points:100 Stellar Wave
Dificultad 2/5 1-3 horas Aptitud para principiantes 80/100
Divinity-Labs/Lens#341 · 2 comentarios · 1 asignado ·
Los mantenedores suelen responder en 3 días
Todos los issues de Divinity-Labs/Lens
Issues similares
-
[功能请求] 设置选项语言调整Abierto功能请求
Dificultad 2/5 1-3 horas Aptitud para principiantes 66/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
antithesishq/bombadil#473 ·
Los mantenedores suelen responder en 2 días
-
The structured output reference promises null results for refusals that carry validation detailsAbiertobug
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
mattermost/mattermost-mobile#10358 ·
Los mantenedores suelen responder en 1 día
-
ready-for-agent
Dificultad 1/5 Menos de una hora Aptitud para principiantes 86/100
LucasSantana-Dev/Lucky#3257 ·
Los mantenedores suelen responder en 1 día