Repository navigation
feat(services): pause polls, OCR and renewal for friends whose Canvas token was refused - #182
Merged
Merged
Conversation
… token was refused A friend whose chain is cut has nothing to read or renew until the form brings a new token, yet every 10 min the services still ran a poll, a maintenance and an OCR child for them (3-4 s each, about half the background CPU with 9 of 11 friends cut). vinci-sondeo now skips their poll and OCR; vinci-mantenimiento runs them only in the :02 pass, which keeps the daily reconnect form going out. The 07:00 summary still reaches them. Health reports their poll as paused and counts lateness from a reseed, so the watchdog raises no false alarm.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
A friend whose Canvas token was refused has nothing to read or renew until they send a new one through the form, but the container kept running their poll, maintenance and OCR every 10 minutes. Live today, 9 of 11 friends are in that state, and their runs (3–4 s of Python each, ×3 per cycle) take about half of the background CPU:
Now, for a friend whose chain is cut:
vinci-sondeoskips their poll and OCR. The 07:00 summary still goes to them.vinci-mantenimientoruns them only in the :02 pass each hour. That is enough for the daily message with the reconnect form (poller._token_refused, at most once every 24 h, during the day).healthreports their «Sondeo» as «en pausa» and allows 75 min for their maintenance. A reseed writescanvas_reseeded_at, and lateness is counted from it, so the watchdog never warns the captain about a friend who just came back.The trade-off: while paused, a friend gets no deadline reminders from the stale copy of their aula. They do get the daily summary and the reconnect form.
Original request (captain, in chat): «podriamos hacer que vinci tenga una arquitectura distribuida en la cual escale segun la carga». After measuring the container (2 GB limit, 1.2 GB used, about 0.5 core on average, no active agents), autoscaling would save nothing on a fixed-price VPS. The waste was these runs, and the captain chose to skip them.
E2E:
test_whatsapp_friendadds a friend whose token was refused and checks thatsondeo --todosand the OCR pass leave them out. 5 passed.Not run end to end on the live container yet: needs the Redeploy.
Docs:
docs/guia/servidor.md(both services),docs/guia/problemas.md(paused alerts),.claude/skills/control-vinci/references/features/token.md, AGENTS.md «Status».