Skip to content

Commit 8ed82ab

Browse files
committed
dataset push only in normal mode for debugging
1 parent 204b358 commit 8ed82ab

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

src/actors/call.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,6 @@ export async function callActorGetDataset(
3636
const dataset = await client.dataset(results.defaultDatasetId).listItems();
3737
log.info(`Actor ${name} finished with ${dataset.items.length} items`);
3838

39-
if (process.env.APIFY_IS_AT_HOME) {
40-
await Actor.pushData(dataset.items);
41-
log.info(`Pushed ${dataset.items.length} items to the dataset`);
42-
}
4339
return dataset.items;
4440
} catch (error) {
4541
log.error(`Error calling actor: ${error}. Actor: ${name}, input: ${JSON.stringify(input)}`);

src/main.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,9 @@ if (isActorStandby()) {
4747
await Actor.fail('If you need to debug a specific Actor, please provide the debugActor and debugActorInput fields in the input');
4848
}
4949
const options = { memory: input.maxActorMemoryBytes } as ActorCallOptions;
50-
await callActorGetDataset(input.debugActor!, input.debugActorInput!, process.env.APIFY_TOKEN, options);
50+
const items = await callActorGetDataset(input.debugActor!, input.debugActorInput!, process.env.APIFY_TOKEN, options);
51+
52+
await Actor.pushData(items);
53+
log.info(`Pushed ${items.length} items to the dataset`);
5154
await Actor.exit();
5255
}

0 commit comments

Comments
 (0)