Apify and Crawlee Official Forum

Home
Members
dev__usman
d
dev__usman
Offline, last seen 4 months ago
Joined September 3, 2024
console.log(Starting loop for follower: ${follower});

// Run the actor and wait for it to complete
const run = await client.actor(process.env.APIFY_PAY_PER_USER_ACTOR).call(input);
console.log(Actor run started for follower: ${follower}. Dataset ID: ${run.defaultDatasetId});

if (!run.defaultDatasetId) {
console.error(No dataset ID returned for follower: ${follower});
continue;
}

// Delay to allow the dataset to populate
await new Promise(resolve => setTimeout(resolve, 10000)); // Wait 10 seconds

const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(Number of items retrieved: ${items.length});

if (items.length === 0) {
console.log(No items found in the dataset for follower: ${follower});
} else {
console.log(Results from dataset for follower: ${follower}:);
items.forEach((item) => {
console.log(item);
});
}

output = Capacity for each follower: 3
Starting loop for follower: zuck
Server Working 8080
Live DB Connected
Actor run started for follower: zuck. Dataset ID: tvXHJZwO1tiEoJdf1
Number of items retrieved: 0
No items found in the dataset for follower: zuck
Data retrieval done for follower: zuck
4 comments
d
A
P