Polling sources¶
Adriano does not watch sources by itself.
A poll reads every registration with poll in its intake,
picks up new, changed and removed records, and stores the result.
You schedule polls outside Adriano, and operators can start one from
the web UI at any time.
Only files that changed since the last poll are downloaded again, so frequent polls are cheap.
Scheduling polls¶
Run adriano poll on a schedule, as a one-off command next to the
running container.
Every 15 minutes is a reasonable start; set
ADRIANO_STALE_AFTER_MINUTES to a few poll intervals.
cron on the Docker host¶
*/15 * * * * docker compose -f /opt/adriano/docker-compose.yml exec -T adriano adriano poll >> /var/log/adriano-poll.log 2>&1
-T is needed because cron has no terminal.
Kubernetes CronJob¶
Run the Adriano image with the command ["adriano", "poll"],
with the same environment, secrets and catalog file mount as the
Deployment.
Set concurrencyPolicy: Forbid so a slow poll is not overlapped
by the next one.
The example in Kubernetes does exactly this.
Polling one registration¶
docker compose exec adriano adriano poll --source central
Exit codes¶
0Every registration polled cleanly (
ok).1At least one registration was
partial,failedordisabled.2Usage error (unknown
--source) or the database is unreachable.
Alert on anything but 0.
The output prints one line per registration with its counts and the
problems found.
“Poll now” in the web UI¶
Users with the operate permission see “Poll now” next to each
registration and “Poll all” on the Sources page.
The poll runs in the background; the page refreshes itself a few
times afterwards.
For a long poll, reload the page later to see the final result.
A poll requested while another one is writing the same registration
waits for it, so overlapping polls are safe.
The Sources page as seen by an operator.¶
Poll results¶
Each registration ends a poll with one of these statuses, shown on the Sources page:
okEverything was listed and read.
partialSome projects or files could not be listed or read. Everything that was read is stored; nothing is removed for the parts that could not be listed.
failedThe source could not be listed at all (unreachable, bad credentials, missing folder) or the result could not be saved. The previously indexed content is kept unchanged.
disabledThe registration is switched off because of a configuration problem; it is not polled.
neverNot polled yet.
A failure in one registration never affects the others.
What users see after a failed or partial poll¶
Records stay browsable.
Record pages of the affected registration show a banner saying the
content may be out of date.
The same banner appears when the last successful poll is older than
ADRIANO_STALE_AFTER_MINUTES.
A record page after its source failed to poll.¶
Operators see the problem and a suggested fix below the registration on the Sources page:
A failed poll on the Sources page.¶
Fix the cause (credentials, network, mount, permissions), then
poll again.
The banner disappears with the next ok poll.
When records are removed¶
A published record is removed from the catalog only when a poll listed its project completely and the file was no longer there. Candidates pushed by CI are never removed by a poll. Approval history is never removed.