You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit eea6b17
Browse filesBrowse the repository at this point in the historyBrowse files
Fix run metadata changes sometimes reaching the API only when the run finished, so realtime subscribers and parent runs didn't see progress while the task was still running. This also fixes a metadata `append` or `increment` occasionally being applied twice at the end of a run, and a new run that reused the previous run's process sometimes seeing that run's metadata values.
Copy file name to clipboardExpand all lines: docs/runs/metadata.mdx
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -368,7 +368,7 @@ export const myTask = task({
368
368
369
369
### flush
370
370
371
-
Flush the metadata to the database. The SDK will automatically flush the metadata periodically, so you don't need to call this method unless you need to ensure that the metadata is persisted immediately.
371
+
Send pending metadata changes to the database now instead of waiting for the next automatic flush. The SDK flushes metadata automatically about once a second, so you only need this when you want changes sent sooner. If a flush is already in progress, `flush()` returns without waiting for it. Your changes stay queued and go out with a later automatic flush once that request finishes, or with the run's completion if the run finishes first.
0 commit comments