feat: implement continuous polling loop #5
Labels
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: peter/schiphol#5
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Parent
Part of #1
What to build
Make the producer run indefinitely. After the one-time startup (OTel initialisation, Kafka engine start, HTTP session creation),
start()enters an infinite loop: it callspoll(), logs the number of Flights published, sleeps for 5 minutes, then callspoll()again.Two additional behaviours:
poll()is wrapped in apoll_cyclespan carrying aflights.publishedinteger attribute equal to the return value ofpoll().poll()raises an exception (e.g. a transient HTTP error from the Schiphol API), the loop logs the error and continues to the next cycle rather than crashing the process.Graceful shutdown on SIGTERM/SIGINT is already handled by
aiorun; no changes are needed there.Acceptance criteria
poll_cycleOTel span with aflights.publishedattributepoll()) is logged and the loop continues; the process does not crashaiorunbehaviour preserved)Blocked by