Skip to content

Commit 6a355c0

Browse files
committed
fixes
1 parent ab5e836 commit 6a355c0

2 files changed

Lines changed: 10 additions & 2 deletions

File tree

js/botasaurus-js/src/playwright.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,10 @@ function createPlaywright<I>(
186186
const isAborted = combined.isAborted ?? (() => false);
187187
// @ts-ignore
188188
const pushData = combined.pushData ?? (() => {});
189+
// @ts-ignore
190+
const taskId = combined.taskId ?? null;
191+
// @ts-ignore
192+
const parentTaskId = combined.parentTaskId ?? null;
189193
const fn_name = performPlaywright.__name__;
190194

191195
if (cache) {
@@ -232,7 +236,7 @@ function createPlaywright<I>(
232236
// ...
233237
}
234238

235-
result = await run({ data, metadata, isAborted, pushData, ...driver });
239+
result = await run({ data, metadata, taskId, parentTaskId, isAborted, pushData, ...driver });
236240
if (result === undefined) {
237241
result = null;
238242
}

js/botasaurus-js/src/task.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,10 @@ function createTask<I>(options: TaskOptions<I>, is_async_queue: boolean) {
6363
const isAborted = combined.isAborted ?? (() => false)
6464
// @ts-ignore
6565
const pushData = combined.pushData ?? (() => {})
66+
// @ts-ignore
67+
const taskId = combined.taskId ?? null
68+
// @ts-ignore
69+
const parentTaskId = combined.parentTaskId ?? null
6670
const fn_name = performTask.__name__
6771

6872
if (cache) {
@@ -90,7 +94,7 @@ function createTask<I>(options: TaskOptions<I>, is_async_queue: boolean) {
9094

9195
let result: any
9296
try {
93-
result = await run({ data, metadata, isAborted, pushData })
97+
result = await run({ data, metadata, taskId, parentTaskId, isAborted, pushData })
9498
if (result === undefined) {
9599
result = null
96100
}

0 commit comments

Comments
 (0)