File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed
Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -290,7 +290,7 @@ const batchHandle = await tasks.batchTrigger([
290290console .log (batchHandle .runs );
291291```
292292
293- In v4, you now need to use the ` runs.list ()` method to get the list of runs:
293+ In v4, you now need to use the ` batch.retrieve ()` method to get the batch with its runs:
294294
295295``` ts
296296// In v4
@@ -299,9 +299,9 @@ const batchHandle = await tasks.batchTrigger([
299299 [myOtherTask , { baz: " qux" }],
300300]);
301301
302- // Now you need to call runs.list()
303- const runs = await batchHandle . runs . list ( );
304- console .log (runs );
302+ // Now you need to retrieve the batch to get the runs
303+ const batch = await batch . retrieve ( batchHandle . batchId );
304+ console .log (batch . runs );
305305```
306306
307307### OpenTelemetry
Original file line number Diff line number Diff line change @@ -200,8 +200,8 @@ const batchHandle = await tasks.batchTrigger([
200200 [ myOtherTask, { baz: "qux" }] ,
201201] );
202202
203- const runs = await batchHandle.runs.list( ); // Use runs.list ()
204- console.log(runs);
203+ const batch = await batch.retrieve(batchHandle.batchId ); // Use batch.retrieve ()
204+ console.log(batch. runs);
205205
206206
207207Can you help me convert the following code from v3 to v4? Please include the full converted code in the answer, do not truncate it anywhere.
You can’t perform that action at this time.
0 commit comments