Lesson 3: Long-running handlers that report progress and stop
26 min read·13 Oct 2026
Module 5 · Lesson 3 · About 60 minutes · Needs: Lesson 1 of this module (the packaged server); Module 2 Lesson 2 (progress and cancellation on the wire); no model key
The situation
Monday 21 September 2026. Tomas wants a "reindex" button that rebuilds the assistant's word index after he adds notes. On a full archive that takes minutes, so he asks for three things: Nare can still search while it runs, he can see how far it has got, and Stop stops it without leaving a half-written index.
Module 2 showed progress and cancellation on the wire. This lesson is the handler's side. You follow one call, reindex_notes over four of Nare's notes, as it runs, reports, stops and is tested.