We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 307bb09 commit 8996f8eCopy full SHA for 8996f8e
docs/runs/heartbeats.mdx
@@ -15,14 +15,14 @@ export const processLargeDataset = task({
15
id: "process-large-dataset",
16
run: async (payload: { items: string[] }) => {
17
for (const row of payload.items) {
18
- process(row);
19
await heartbeats.yield();
+ processRow(row);
20
}
21
return { processed: payload.items.length };
22
},
23
});
24
25
-function process(row: string) {
+function processRow(row: string) {
26
// synchronous CPU-heavy work
27
28
```
0 commit comments