prefactor: extract poll() function from start() #3
Labels
No Milestone
No project
No Assignees
1 Participants
Notifications
Total Time Spent: 1 second
Due Date
peter
1 second
No due date set.
Dependencies
No dependencies set.
Reference: peter/schiphol#3
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
Extract the inner fetch-and-publish sweep from
start()into a standalone async functionpoll()that accepts the HTTP session, Kafka stream engine, API settings, Kafka settings, and tracer as parameters, and returns the total number of Flights published.start()is updated to callpoll()exactly once — observable behaviour is unchanged. No tests are added in this ticket. The goal is purely to create the seam that tickets 3 and 4 depend on.Acceptance criteria
poll()exists inmain.pywith the signatureasync def poll(session, stream_engine, api_settings, kafka_settings, tracer) -> intpoll()contains all pagination logic (followinglink: rel="next"headers) and all Kafka publish logic from the originalstart()sweeppoll()returns the total number of Flights published in that sweepstart()callspoll()once and the end-to-end producer behaviour is unchangedBlocked by
None — can start immediately.