Skip to content

Add support for checkpoints - #161

Merged
joefreeman merged 1 commit into
mainfrom
checkpoints
Sep 5, 2026
Merged

Add support for checkpoints#161
joefreeman merged 1 commit into
mainfrom
checkpoints

Conversation

@joefreeman

Copy link
Copy Markdown
Collaborator

Checkpoints provide a way to persist state for a step, which can be retrieved for subsequent step executions. This is useful for storing cursors.

A checkpoint is defined like this:

cursor = cf.Checkpoint("cursor", default=0)

And then within a task/workflow can be get and set:

since = cursor.get()
# ...
cursor.set(next_since)

Cursors get flushed periodically by the worker, but cf.flush() can be called to explicitly flush cursors (and metrics/logs).

@joefreeman
joefreeman merged commit 9f5f77a into main Sep 5, 2026
8 of 9 checks passed
@joefreeman
joefreeman deleted the checkpoints branch September 5, 2026 11:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant