Skip to main content
Big news! Interval has been acquired by Meter. Learn more →

ctx.loading.completeOne

Marks a chunk of work as completed to dynamically provide granular loading progress. Can only be used after ctx.loading.start was called with itemsInQueue.

await ctx.loading.start({
title: "Migrating users",
description: "Enabling edit button for selected users",
itemsInQueue: 100,
});

for (const user of users) {
migrateUser(user);
await ctx.loading.completeOne();
}

Returns

null

Did this section clearly explain what you wanted to learn?