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([
290
290
console .log (batchHandle .runs );
291
291
```
292
292
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:
294
294
295
295
``` ts
296
296
// In v4
@@ -299,9 +299,9 @@ const batchHandle = await tasks.batchTrigger([
299
299
[myOtherTask , { baz: " qux" }],
300
300
]);
301
301
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 );
305
305
```
306
306
307
307
### OpenTelemetry
Original file line number Diff line number Diff line change @@ -200,8 +200,8 @@ const batchHandle = await tasks.batchTrigger([
200
200
[myOtherTask, { baz: "qux" }],
201
201
]);
202
202
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);
205
205
206
206
207
207
Can 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